Alter virNodeDeviceObjListExport in order to pass the drivers->devs
by reference
Signed-off-by: John Ferlan <jferlan(a)redhat.com>
---
src/conf/virnodedeviceobj.c | 8 ++++----
src/conf/virnodedeviceobj.h | 2 +-
src/node_device/node_device_driver.c | 2 +-
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/conf/virnodedeviceobj.c b/src/conf/virnodedeviceobj.c
index 5a8dfe7..fc82799 100644
--- a/src/conf/virnodedeviceobj.c
+++ b/src/conf/virnodedeviceobj.c
@@ -561,7 +561,7 @@ virNodeDeviceMatch(virNodeDeviceObjPtr devobj,
int
virNodeDeviceObjListExport(virConnectPtr conn,
- virNodeDeviceObjList devobjs,
+ virNodeDeviceObjListPtr devobjs,
virNodeDevicePtr **devices,
virNodeDeviceObjListFilter filter,
unsigned int flags)
@@ -572,11 +572,11 @@ virNodeDeviceObjListExport(virConnectPtr conn,
int ret = -1;
size_t i;
- if (devices && VIR_ALLOC_N(tmp_devices, devobjs.count + 1) < 0)
+ if (devices && VIR_ALLOC_N(tmp_devices, devobjs->count + 1) < 0)
goto cleanup;
- for (i = 0; i < devobjs.count; i++) {
- virNodeDeviceObjPtr devobj = devobjs.objs[i];
+ for (i = 0; i < devobjs->count; i++) {
+ virNodeDeviceObjPtr devobj = devobjs->objs[i];
virNodeDeviceObjLock(devobj);
if ((!filter || filter(conn, devobj->def)) &&
virNodeDeviceMatch(devobj, flags)) {
diff --git a/src/conf/virnodedeviceobj.h b/src/conf/virnodedeviceobj.h
index 0acd8ce..b8b534b 100644
--- a/src/conf/virnodedeviceobj.h
+++ b/src/conf/virnodedeviceobj.h
@@ -94,7 +94,7 @@ virNodeDeviceObjGetNames(virNodeDeviceObjListPtr devs,
int
virNodeDeviceObjListExport(virConnectPtr conn,
- virNodeDeviceObjList devobjs,
+ virNodeDeviceObjListPtr devobjs,
virNodeDevicePtr **devices,
virNodeDeviceObjListFilter filter,
unsigned int flags);
diff --git a/src/node_device/node_device_driver.c b/src/node_device/node_device_driver.c
index e850a22..269b086 100644
--- a/src/node_device/node_device_driver.c
+++ b/src/node_device/node_device_driver.c
@@ -213,7 +213,7 @@ nodeConnectListAllNodeDevices(virConnectPtr conn,
return -1;
nodeDeviceLock();
- ret = virNodeDeviceObjListExport(conn, driver->devs, devices,
+ ret = virNodeDeviceObjListExport(conn, &driver->devs, devices,
virConnectListAllNodeDevicesCheckACL,
flags);
nodeDeviceUnlock();
--
2.9.3