On 7/23/21 6:40 PM, Jonathon Jongsma wrote:
This is a generic function that you can provide your own predicate
function to search for a particular device. It will be used in an
upcoming commit.
Signed-off-by: Jonathon Jongsma <jjongsma(a)redhat.com>
---
src/conf/virnodedeviceobj.c | 53 +++++++++++++++++++++++++++++++------
src/conf/virnodedeviceobj.h | 11 +++++---
src/libvirt_private.syms | 1 +
3 files changed, 54 insertions(+), 11 deletions(-)
diff --git a/src/conf/virnodedeviceobj.c b/src/conf/virnodedeviceobj.c
index b213592b56..6e7b354f96 100644
--- a/src/conf/virnodedeviceobj.c
+++ b/src/conf/virnodedeviceobj.c
@@ -1026,19 +1026,19 @@ virNodeDeviceObjSetPersistent(virNodeDeviceObj *obj,
}
-struct virNodeDeviceObjListRemoveHelperData
+typedef struct
{
- virNodeDeviceObjListRemoveIterator callback;
+ virNodeDeviceObjListPredicate predicate;
void *opaque;
-};
+} PredicateHelperData;
We usually split this into:
typedef struct _virXXX virXXX;
struct _virXXX {
...
};
and honestly I've never understood why. I blamed coding style.
Michal