From 0c7a9b994cdf7b6a7bee2b1784a33bfaf01df9a7 Mon Sep 17 00:00:00 2001 From: John Ferlan Date: Mon, 2 Nov 2015 16:07:34 -0500 Subject: [PATCH] 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. --- src/conf/storage_conf.h | 2 +- src/storage/storage_driver.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/conf/storage_conf.h b/src/conf/storage_conf.h index 74710062d9..ec59c178cf 100644 --- a/src/conf/storage_conf.h +++ b/src/conf/storage_conf.h @@ -266,7 +266,7 @@ struct _virStoragePoolObj { char *configFile; char *autostartLink; - int active; + bool active; int autostart; unsigned int asyncjobs; diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c index ee8b263bac..aeb67a715b 100644 --- a/src/storage/storage_driver.c +++ b/src/storage/storage_driver.c @@ -205,7 +205,7 @@ storageDriverAutostart(void) virStoragePoolObjUnlock(pool); continue; } - pool->active = 1; + pool->active = true; } virStoragePoolObjUnlock(pool); } @@ -715,7 +715,7 @@ storagePoolCreateXML(virConnectPtr conn, goto cleanup; } VIR_INFO("Creating storage pool '%s'", pool->def->name); - pool->active = 1; + pool->active = true; ret = virGetStoragePool(conn, pool->def->name, pool->def->uuid, NULL, NULL); @@ -881,7 +881,7 @@ storagePoolCreate(virStoragePoolPtr obj, goto cleanup; } - pool->active = 1; + pool->active = true; ret = 0; cleanup: @@ -978,7 +978,7 @@ storagePoolDestroy(virStoragePoolPtr obj) virStoragePoolObjClearVols(pool); - pool->active = 0; + pool->active = false; if (pool->configFile == NULL) { virStoragePoolObjRemove(&driver->pools, pool); @@ -1100,7 +1100,7 @@ storagePoolRefresh(virStoragePoolPtr obj, if (backend->stopPool) backend->stopPool(obj->conn, pool); - pool->active = 0; + pool->active = false; if (pool->configFile == NULL) { virStoragePoolObjRemove(&driver->pools, pool);