]> xenbits.xensource.com Git - 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, 31 Mar 2014 22:30:35 +0000 (18:30 -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.

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 5b3b5361f42909e03f002e85002921ad1250f7e1..7795b33743510cf9d4ebf8d9e4bbac51f1b05e74 100644 (file)
@@ -1338,9 +1338,9 @@ virStorageBackendUpdateVolTargetInfo(virStorageVolTargetPtr target,
 }
 
 int
-virStorageBackendUpdateVolInfoFlags(virStorageVolDefPtr vol,
-                                    int withCapacity,
-                                    unsigned int openflags)
+virStorageBackendUpdateVolInfo(virStorageVolDefPtr vol,
+                               bool withCapacity,
+                               unsigned int openflags)
 {
     int ret;
 
@@ -1359,13 +1359,6 @@ virStorageBackendUpdateVolInfoFlags(virStorageVolDefPtr vol,
     return 0;
 }
 
-int virStorageBackendUpdateVolInfo(virStorageVolDefPtr vol,
-                                   int withCapacity)
-{
-    return virStorageBackendUpdateVolInfoFlags(vol, withCapacity,
-                                               VIR_STORAGE_VOL_OPEN_DEFAULT);
-}
-
 /*
  * virStorageBackendUpdateVolTargetInfoFD:
  * @target: target definition ptr of volume to update
index 2034a22d6e039954a205d26436ebcf766260e933..56f8d03221a67457c7561a421cf5cbfbe353a4a6 100644 (file)
@@ -138,10 +138,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 8276c9676a4548347845665e96aca2fd1016e1f8..a8652c16169c8f6b3a07ab88ceca568cde3b068f 100644 (file)
@@ -113,7 +113,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 0f8da069b8e1e025839b6cc426db4cded07c5312..aa3ad2bcd7c3a2697ddc7cf316b3654db5bec369 100644 (file)
@@ -1180,8 +1180,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 f90d37377d0845542e734030b080e3d1062db4e8..f2254a4d3f9c465fee14a8b6664863000e99d96d 100644 (file)
@@ -149,7 +149,8 @@ virStorageBackendLogicalMakeVol(char **const groups,
     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;