mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
conf: nodedev: Rename virNodeDeviceCapMatch to virNodeDevObjHasCap
We currently have 2 methods that do the capability matching. This should be condensed to a single function and all the derivates should just call into that using a proper type conversion. Signed-off-by: Erik Skultety <eskultet@redhat.com>
This commit is contained in:
parent
1cbaeda707
commit
54cab10518
@ -53,8 +53,7 @@ static virClassPtr virNodeDeviceObjClass;
|
|||||||
static virClassPtr virNodeDeviceObjListClass;
|
static virClassPtr virNodeDeviceObjListClass;
|
||||||
static void virNodeDeviceObjDispose(void *opaque);
|
static void virNodeDeviceObjDispose(void *opaque);
|
||||||
static void virNodeDeviceObjListDispose(void *opaque);
|
static void virNodeDeviceObjListDispose(void *opaque);
|
||||||
static bool virNodeDeviceObjHasCapStr(const virNodeDeviceObj *obj,
|
static bool virNodeDeviceObjHasCap(const virNodeDeviceObj *obj, int type);
|
||||||
const char *cap);
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
virNodeDeviceObjOnceInit(void)
|
virNodeDeviceObjOnceInit(void)
|
||||||
@ -683,8 +682,8 @@ virNodeDeviceObjListGetParentHost(virNodeDeviceObjListPtr devs,
|
|||||||
|
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
virNodeDeviceCapMatch(virNodeDeviceObjPtr obj,
|
virNodeDeviceObjHasCap(const virNodeDeviceObj *obj,
|
||||||
int type)
|
int type)
|
||||||
{
|
{
|
||||||
virNodeDevCapsDefPtr cap = NULL;
|
virNodeDevCapsDefPtr cap = NULL;
|
||||||
|
|
||||||
@ -850,7 +849,7 @@ virNodeDeviceObjListGetNames(virNodeDeviceObjListPtr devs,
|
|||||||
|
|
||||||
|
|
||||||
#define MATCH(FLAG) ((flags & (VIR_CONNECT_LIST_NODE_DEVICES_CAP_ ## FLAG)) && \
|
#define MATCH(FLAG) ((flags & (VIR_CONNECT_LIST_NODE_DEVICES_CAP_ ## FLAG)) && \
|
||||||
virNodeDeviceCapMatch(obj, VIR_NODE_DEV_CAP_ ## FLAG))
|
virNodeDeviceObjHasCap(obj, VIR_NODE_DEV_CAP_ ## FLAG))
|
||||||
static bool
|
static bool
|
||||||
virNodeDeviceMatch(virNodeDeviceObjPtr obj,
|
virNodeDeviceMatch(virNodeDeviceObjPtr obj,
|
||||||
unsigned int flags)
|
unsigned int flags)
|
||||||
|
Loading…
Reference in New Issue
Block a user