]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
storage: Fill in storage pool @active properly
authorJohn Ferlan <jferlan@redhat.com>
Sat, 19 Aug 2017 12:25:21 +0000 (08:25 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Tue, 19 Sep 2017 12:28:50 +0000 (08:28 -0400)
It's a bool not an int, so use true/false and not 1/0

src/conf/virstorageobj.c
src/test/test_driver.c

index eb7664cdd1f09ebd3a97ae8cdea24d0c00030834..a9fa190c3ca99a46de1c5ffdf3911f67a68fcf5e 100644 (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);
index 6e8a4b5782dd2094773cc548653f93fa55163ef1..e6660e4d687a201f2b8bf114c739960826fa7626 100644 (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) {