mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 22:25:25 +00:00
storage: Pass driver arg by ref
Alter virStoragePoolObjListExport in order to pass the drivers->pools by reference Signed-off-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
parent
50e6d4e8e1
commit
babf148a94
@ -1099,7 +1099,7 @@ virStoragePoolMatch(virStoragePoolObjPtr poolobj,
|
||||
|
||||
int
|
||||
virStoragePoolObjListExport(virConnectPtr conn,
|
||||
virStoragePoolObjList poolobjs,
|
||||
virStoragePoolObjListPtr poolobjs,
|
||||
virStoragePoolPtr **pools,
|
||||
virStoragePoolObjListFilter filter,
|
||||
unsigned int flags)
|
||||
@ -1110,11 +1110,11 @@ virStoragePoolObjListExport(virConnectPtr conn,
|
||||
int ret = -1;
|
||||
size_t i;
|
||||
|
||||
if (pools && VIR_ALLOC_N(tmp_pools, poolobjs.count + 1) < 0)
|
||||
if (pools && VIR_ALLOC_N(tmp_pools, poolobjs->count + 1) < 0)
|
||||
goto cleanup;
|
||||
|
||||
for (i = 0; i < poolobjs.count; i++) {
|
||||
virStoragePoolObjPtr poolobj = poolobjs.objs[i];
|
||||
for (i = 0; i < poolobjs->count; i++) {
|
||||
virStoragePoolObjPtr poolobj = poolobjs->objs[i];
|
||||
virStoragePoolObjLock(poolobj);
|
||||
if ((!filter || filter(conn, poolobj->def)) &&
|
||||
virStoragePoolMatch(poolobj, flags)) {
|
||||
|
@ -191,7 +191,7 @@ virStoragePoolObjUnlock(virStoragePoolObjPtr obj);
|
||||
|
||||
int
|
||||
virStoragePoolObjListExport(virConnectPtr conn,
|
||||
virStoragePoolObjList poolobjs,
|
||||
virStoragePoolObjListPtr poolobjs,
|
||||
virStoragePoolPtr **pools,
|
||||
virStoragePoolObjListFilter filter,
|
||||
unsigned int flags);
|
||||
|
@ -2647,7 +2647,7 @@ storageConnectListAllStoragePools(virConnectPtr conn,
|
||||
goto cleanup;
|
||||
|
||||
storageDriverLock();
|
||||
ret = virStoragePoolObjListExport(conn, driver->pools, pools,
|
||||
ret = virStoragePoolObjListExport(conn, &driver->pools, pools,
|
||||
virConnectListAllStoragePoolsCheckACL,
|
||||
flags);
|
||||
storageDriverUnlock();
|
||||
|
@ -4177,7 +4177,7 @@ testConnectListAllStoragePools(virConnectPtr conn,
|
||||
virCheckFlags(VIR_CONNECT_LIST_STORAGE_POOLS_FILTERS_ALL, -1);
|
||||
|
||||
testDriverLock(privconn);
|
||||
ret = virStoragePoolObjListExport(conn, privconn->pools, pools,
|
||||
ret = virStoragePoolObjListExport(conn, &privconn->pools, pools,
|
||||
NULL, flags);
|
||||
testDriverUnlock(privconn);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user