提交 0c7a9b99 编写于 作者: J John Ferlan

storage: Make active boolean

Since we treat it like a boolean, let's store it that way. At least one
path had already treated as true/false anyway.
上级 63ed05d2
...@@ -266,7 +266,7 @@ struct _virStoragePoolObj { ...@@ -266,7 +266,7 @@ struct _virStoragePoolObj {
char *configFile; char *configFile;
char *autostartLink; char *autostartLink;
int active; bool active;
int autostart; int autostart;
unsigned int asyncjobs; unsigned int asyncjobs;
......
...@@ -205,7 +205,7 @@ storageDriverAutostart(void) ...@@ -205,7 +205,7 @@ storageDriverAutostart(void)
virStoragePoolObjUnlock(pool); virStoragePoolObjUnlock(pool);
continue; continue;
} }
pool->active = 1; pool->active = true;
} }
virStoragePoolObjUnlock(pool); virStoragePoolObjUnlock(pool);
} }
...@@ -715,7 +715,7 @@ storagePoolCreateXML(virConnectPtr conn, ...@@ -715,7 +715,7 @@ storagePoolCreateXML(virConnectPtr conn,
goto cleanup; goto cleanup;
} }
VIR_INFO("Creating storage pool '%s'", pool->def->name); VIR_INFO("Creating storage pool '%s'", pool->def->name);
pool->active = 1; pool->active = true;
ret = virGetStoragePool(conn, pool->def->name, pool->def->uuid, ret = virGetStoragePool(conn, pool->def->name, pool->def->uuid,
NULL, NULL); NULL, NULL);
...@@ -881,7 +881,7 @@ storagePoolCreate(virStoragePoolPtr obj, ...@@ -881,7 +881,7 @@ storagePoolCreate(virStoragePoolPtr obj,
goto cleanup; goto cleanup;
} }
pool->active = 1; pool->active = true;
ret = 0; ret = 0;
cleanup: cleanup:
...@@ -978,7 +978,7 @@ storagePoolDestroy(virStoragePoolPtr obj) ...@@ -978,7 +978,7 @@ storagePoolDestroy(virStoragePoolPtr obj)
virStoragePoolObjClearVols(pool); virStoragePoolObjClearVols(pool);
pool->active = 0; pool->active = false;
if (pool->configFile == NULL) { if (pool->configFile == NULL) {
virStoragePoolObjRemove(&driver->pools, pool); virStoragePoolObjRemove(&driver->pools, pool);
...@@ -1100,7 +1100,7 @@ storagePoolRefresh(virStoragePoolPtr obj, ...@@ -1100,7 +1100,7 @@ storagePoolRefresh(virStoragePoolPtr obj,
if (backend->stopPool) if (backend->stopPool)
backend->stopPool(obj->conn, pool); backend->stopPool(obj->conn, pool);
pool->active = 0; pool->active = false;
if (pool->configFile == NULL) { if (pool->configFile == NULL) {
virStoragePoolObjRemove(&driver->pools, pool); virStoragePoolObjRemove(&driver->pools, pool);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册