]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
storage: Rename UpdateVolInfoFlags to UpdateVolInfo
authorCole Robinson <crobinso@redhat.com>
Sun, 30 Mar 2014 22:27:14 +0000 (18:27 -0400)
committerCole Robinson <crobinso@redhat.com>
Mon, 8 Sep 2014 16:02:47 +0000 (12:02 -0400)
And drop the original UpdateVolInfo. Makes it a bit easier to follow
the function usage.

And change the int parameter to an explicit bool.

(cherry picked from commit 16d75d19fcbd1d94f6b3722f487af308246fc123)

Conflicts:
src/storage/storage_backend.h

src/storage/storage_backend.c
src/storage/storage_backend.h
src/storage/storage_backend_disk.c
src/storage/storage_backend_fs.c
src/storage/storage_backend_logical.c

index e522a0686cb6084ebc2abe757188eeed059b56ad..395c1df94870a8b30a0d198d17caa61fda31a39e 100644 (file)
@@ -1239,9 +1239,9 @@ virStorageBackendUpdateVolTargetInfo(virStorageVolTargetPtr target,
 }
 
 int
-virStorageBackendUpdateVolInfoFlags(virStorageVolDefPtr vol,
-                                    int withCapacity,
-                                    unsigned int openflags)
+virStorageBackendUpdateVolInfo(virStorageVolDefPtr vol,
+                               bool withCapacity,
+                               unsigned int openflags)
 {
     int ret;
 
@@ -1260,13 +1260,6 @@ virStorageBackendUpdateVolInfoFlags(virStorageVolDefPtr vol,
     return 0;
 }
 
-int virStorageBackendUpdateVolInfo(virStorageVolDefPtr vol,
-                                   int withCapacity)
-{
-    return virStorageBackendUpdateVolInfoFlags(vol, withCapacity,
-                                               VIR_STORAGE_VOL_OPEN_DEFAULT);
-}
-
 /*
  * virStorageBackendUpdateVolTargetInfoFD:
  * @conn: connection to report errors on
index ca2d240f095db48f77d2cc949101b88ac5588f94..085951d76aadb122947eaf8bc9c2319dde90846c 100644 (file)
@@ -115,11 +115,8 @@ int virStorageBackendVolOpenCheckMode(const char *path, struct stat *sb,
     ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
 
 int virStorageBackendUpdateVolInfo(virStorageVolDefPtr vol,
-                                   int withCapacity);
-
-int virStorageBackendUpdateVolInfoFlags(virStorageVolDefPtr vol,
-                                        int withCapacity,
-                                        unsigned int openflags);
+                                   bool withCapacity,
+                                   unsigned int openflags);
 int virStorageBackendUpdateVolTargetInfo(virStorageVolTargetPtr target,
                                          unsigned long long *allocation,
                                          unsigned long long *capacity,
index 4e53ec5e603a85be007df9b82e5206ff50fb900f..feaaf466d889d9d105f9b0cbf8aec33e063babff 100644 (file)
@@ -115,7 +115,8 @@ virStorageBackendDiskMakeDataVol(virStoragePoolObjPtr pool,
     }
 
     /* Refresh allocation/capacity/perms */
-    if (virStorageBackendUpdateVolInfo(vol, 1) < 0)
+    if (virStorageBackendUpdateVolInfo(vol, true,
+                                       VIR_STORAGE_VOL_OPEN_DEFAULT) < 0)
         return -1;
 
     /* set partition type */
index 58fb7c1d0df362e414f2853dc88a4664aa3a6f4f..6c54478397c0b4a5a29d9bac56344a9712fc2bc3 100644 (file)
@@ -1164,8 +1164,8 @@ virStorageBackendFileSystemVolRefresh(virConnectPtr conn,
     int ret;
 
     /* Refresh allocation / permissions info in case its changed */
-    ret = virStorageBackendUpdateVolInfoFlags(vol, 0,
-                                              VIR_STORAGE_VOL_FS_OPEN_FLAGS);
+    ret = virStorageBackendUpdateVolInfo(vol, false,
+                                         VIR_STORAGE_VOL_FS_OPEN_FLAGS);
     if (ret < 0)
         return ret;
 
index c720d1aab6bedf7726d804896d816dff75b7da05..7604ff3ccb9011a121b4fb165df5a0350b436027 100644 (file)
@@ -136,7 +136,8 @@ virStorageBackendLogicalMakeVol(virStoragePoolObjPtr pool,
     if (!vol->key && VIR_STRDUP(vol->key, groups[2]) < 0)
         goto cleanup;
 
-    if (virStorageBackendUpdateVolInfo(vol, 1) < 0)
+    if (virStorageBackendUpdateVolInfo(vol, true,
+                                       VIR_STORAGE_VOL_OPEN_DEFAULT) < 0)
         goto cleanup;
 
     nextents = 1;