mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-13 08:58:33 +03:00
storage: Fill in storage pool @active properly
It's a bool not an int, so use true/false and not 1/0
This commit is contained in:
parent
407e6a3678
commit
acd9a38069
@ -52,7 +52,7 @@ virStoragePoolObjNew(void)
|
||||
return NULL;
|
||||
}
|
||||
virStoragePoolObjLock(obj);
|
||||
obj->active = 0;
|
||||
obj->active = false;
|
||||
return obj;
|
||||
}
|
||||
|
||||
@ -544,7 +544,7 @@ virStoragePoolObjLoadState(virStoragePoolObjListPtr pools,
|
||||
* as active
|
||||
*/
|
||||
|
||||
obj->active = 1;
|
||||
obj->active = true;
|
||||
|
||||
cleanup:
|
||||
VIR_FREE(stateFile);
|
||||
|
@ -1130,7 +1130,7 @@ testParseStorage(testDriverPtr privconn,
|
||||
virStoragePoolObjUnlock(obj);
|
||||
goto error;
|
||||
}
|
||||
obj->active = 1;
|
||||
obj->active = true;
|
||||
|
||||
/* Find storage volumes */
|
||||
if (testOpenVolumesForPool(file, ctxt, obj, i+1) < 0) {
|
||||
@ -4338,7 +4338,7 @@ testStoragePoolCreate(virStoragePoolPtr pool,
|
||||
if (!(obj = testStoragePoolObjFindInactiveByName(privconn, pool->name)))
|
||||
return -1;
|
||||
|
||||
obj->active = 1;
|
||||
obj->active = true;
|
||||
|
||||
event = virStoragePoolEventLifecycleNew(pool->name, pool->uuid,
|
||||
VIR_STORAGE_POOL_EVENT_STARTED,
|
||||
@ -4486,7 +4486,7 @@ testStoragePoolCreateXML(virConnectPtr conn,
|
||||
* code will not Remove the pool */
|
||||
VIR_FREE(obj->configFile);
|
||||
|
||||
obj->active = 1;
|
||||
obj->active = true;
|
||||
|
||||
event = virStoragePoolEventLifecycleNew(obj->def->name, obj->def->uuid,
|
||||
VIR_STORAGE_POOL_EVENT_STARTED,
|
||||
@ -4634,7 +4634,7 @@ testStoragePoolDestroy(virStoragePoolPtr pool)
|
||||
if (!(obj = testStoragePoolObjFindActiveByName(privconn, pool->name)))
|
||||
return -1;
|
||||
|
||||
obj->active = 0;
|
||||
obj->active = false;
|
||||
|
||||
if (obj->def->source.adapter.type ==
|
||||
VIR_STORAGE_ADAPTER_TYPE_FC_HOST) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user