1
0
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:
John Ferlan 2017-08-19 08:25:21 -04:00
parent 407e6a3678
commit acd9a38069
2 changed files with 6 additions and 6 deletions

View File

@ -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);

View File

@ -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) {