mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-20 07:59:00 +00: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;
|
return NULL;
|
||||||
}
|
}
|
||||||
virStoragePoolObjLock(obj);
|
virStoragePoolObjLock(obj);
|
||||||
obj->active = 0;
|
obj->active = false;
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -544,7 +544,7 @@ virStoragePoolObjLoadState(virStoragePoolObjListPtr pools,
|
|||||||
* as active
|
* as active
|
||||||
*/
|
*/
|
||||||
|
|
||||||
obj->active = 1;
|
obj->active = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(stateFile);
|
VIR_FREE(stateFile);
|
||||||
|
@ -1130,7 +1130,7 @@ testParseStorage(testDriverPtr privconn,
|
|||||||
virStoragePoolObjUnlock(obj);
|
virStoragePoolObjUnlock(obj);
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
obj->active = 1;
|
obj->active = true;
|
||||||
|
|
||||||
/* Find storage volumes */
|
/* Find storage volumes */
|
||||||
if (testOpenVolumesForPool(file, ctxt, obj, i+1) < 0) {
|
if (testOpenVolumesForPool(file, ctxt, obj, i+1) < 0) {
|
||||||
@ -4338,7 +4338,7 @@ testStoragePoolCreate(virStoragePoolPtr pool,
|
|||||||
if (!(obj = testStoragePoolObjFindInactiveByName(privconn, pool->name)))
|
if (!(obj = testStoragePoolObjFindInactiveByName(privconn, pool->name)))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
obj->active = 1;
|
obj->active = true;
|
||||||
|
|
||||||
event = virStoragePoolEventLifecycleNew(pool->name, pool->uuid,
|
event = virStoragePoolEventLifecycleNew(pool->name, pool->uuid,
|
||||||
VIR_STORAGE_POOL_EVENT_STARTED,
|
VIR_STORAGE_POOL_EVENT_STARTED,
|
||||||
@ -4486,7 +4486,7 @@ testStoragePoolCreateXML(virConnectPtr conn,
|
|||||||
* code will not Remove the pool */
|
* code will not Remove the pool */
|
||||||
VIR_FREE(obj->configFile);
|
VIR_FREE(obj->configFile);
|
||||||
|
|
||||||
obj->active = 1;
|
obj->active = true;
|
||||||
|
|
||||||
event = virStoragePoolEventLifecycleNew(obj->def->name, obj->def->uuid,
|
event = virStoragePoolEventLifecycleNew(obj->def->name, obj->def->uuid,
|
||||||
VIR_STORAGE_POOL_EVENT_STARTED,
|
VIR_STORAGE_POOL_EVENT_STARTED,
|
||||||
@ -4634,7 +4634,7 @@ testStoragePoolDestroy(virStoragePoolPtr pool)
|
|||||||
if (!(obj = testStoragePoolObjFindActiveByName(privconn, pool->name)))
|
if (!(obj = testStoragePoolObjFindActiveByName(privconn, pool->name)))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
obj->active = 0;
|
obj->active = false;
|
||||||
|
|
||||||
if (obj->def->source.adapter.type ==
|
if (obj->def->source.adapter.type ==
|
||||||
VIR_STORAGE_ADAPTER_TYPE_FC_HOST) {
|
VIR_STORAGE_ADAPTER_TYPE_FC_HOST) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user