]> xenbits.xensource.com Git - libvirt.git/commitdiff
util: Rename virFileWaitForDevices
authorJohn Ferlan <jferlan@redhat.com>
Mon, 20 Feb 2017 12:00:51 +0000 (07:00 -0500)
committerJohn Ferlan <jferlan@redhat.com>
Thu, 16 Mar 2017 01:17:47 +0000 (21:17 -0400)
The function is actually in virutil.c, but prototyped in virfile.h.
This patch fixes that by renaming the function to virWaitForDevices,
adding the prototype in virutil.h and libvirt_private.syms, and then
changing the callers to use the new name.

Signed-off-by: John Ferlan <jferlan@redhat.com>
src/libvirt_private.syms
src/node_device/node_device_driver.c
src/storage/storage_backend_disk.c
src/storage/storage_backend_iscsi.c
src/storage/storage_backend_logical.c
src/storage/storage_backend_mpath.c
src/storage/storage_backend_scsi.c
src/storage/storage_util.c
src/util/virfile.h
src/util/virutil.c
src/util/virutil.h

index 1e64d9f46395404b1b5c352125364e7553294921..0dca4a59f5a13056032bdbe35798c52e13465428 100644 (file)
@@ -1650,7 +1650,6 @@ virFileStripSuffix;
 virFileTouch;
 virFileUnlock;
 virFileUpdatePerm;
-virFileWaitForDevices;
 virFileWrapperFdClose;
 virFileWrapperFdFree;
 virFileWrapperFdNew;
@@ -2760,6 +2759,7 @@ virTristateSwitchTypeFromString;
 virTristateSwitchTypeToString;
 virUpdateSelfLastChanged;
 virValidateWWN;
+virWaitForDevices;
 
 
 # util/viruuid.h
index 39fd43830c4768388b75520696d41502b5918546..99f7bc5476c665ea60dfa59085cd567d3df31f8d 100644 (file)
@@ -548,7 +548,7 @@ find_new_device(virConnectPtr conn, const char *wwnn, const char *wwpn)
 
     while ((now - start) < LINUX_NEW_DEVICE_WAIT_TIME) {
 
-        virFileWaitForDevices();
+        virWaitForDevices();
 
         dev = nodeDeviceLookupSCSIHostByWWN(conn, wwnn, wwpn, 0);
 
index 50bdd3646e7e9e47c6d2580cc5ce445cbbef1469..39371f2d92265879bd097bbce694eba584ebe54f 100644 (file)
@@ -426,7 +426,7 @@ virStorageBackendDiskRefreshPool(virConnectPtr conn ATTRIBUTE_UNUSED,
     VIR_FREE(pool->def->source.devices[0].freeExtents);
     pool->def->source.devices[0].nfreeExtent = 0;
 
-    virFileWaitForDevices();
+    virWaitForDevices();
 
     if (!virFileExists(pool->def->source.devices[0].path)) {
         virReportError(VIR_ERR_INVALID_ARG,
@@ -450,7 +450,7 @@ virStorageBackendDiskStartPool(virConnectPtr conn ATTRIBUTE_UNUSED,
         virStoragePoolFormatDiskTypeToString(pool->def->source.format);
     const char *path = pool->def->source.devices[0].path;
 
-    virFileWaitForDevices();
+    virWaitForDevices();
 
     if (!virFileExists(path)) {
         virReportError(VIR_ERR_INVALID_ARG,
@@ -859,7 +859,7 @@ virStorageBackendDiskCreateVol(virConnectPtr conn,
         goto cleanup;
 
     /* wait for device node to show up */
-    virFileWaitForDevices();
+    virWaitForDevices();
 
     /* Blow away free extent info, as we're about to re-populate it */
     VIR_FREE(pool->def->source.devices[0].freeExtents);
index 866fa74154a729727689dcf96174efc0d9c8f129..14f3e09a8fa6b37bcad5951a90007de68cb9fe8a 100644 (file)
@@ -98,7 +98,7 @@ virStorageBackendISCSIGetHostNumber(const char *sysfs_path,
 
     VIR_DEBUG("Finding host number from '%s'", sysfs_path);
 
-    virFileWaitForDevices();
+    virWaitForDevices();
 
     if (virDirOpen(&sysdir, sysfs_path) < 0)
         goto cleanup;
index 756c62e908f580ae19a81d02b994663c2991948b..29d63b1be1f786c3d9cf3a9ba25078b079cdc6a8 100644 (file)
@@ -831,7 +831,7 @@ virStorageBackendLogicalRefreshPool(virConnectPtr conn ATTRIBUTE_UNUSED,
     virCommandPtr cmd = NULL;
     int ret = -1;
 
-    virFileWaitForDevices();
+    virWaitForDevices();
 
     /* Get list of all logical volumes */
     if (virStorageBackendLogicalFindLVs(pool, NULL) < 0)
@@ -925,7 +925,7 @@ virStorageBackendLogicalDeleteVol(virConnectPtr conn ATTRIBUTE_UNUSED,
 
     virCheckFlags(0, -1);
 
-    virFileWaitForDevices();
+    virWaitForDevices();
 
     lvchange_cmd = virCommandNewArgList(LVCHANGE, "-aln", vol->target.path, NULL);
     lvremove_cmd = virCommandNewArgList(LVREMOVE, "-f", vol->target.path, NULL);
index 4bb38bb528165717fefedfa91e92433753e494b2..606b3997fe2fbdcc36bd0dd34f797237736a4923 100644 (file)
@@ -262,7 +262,7 @@ virStorageBackendMpathRefreshPool(virConnectPtr conn ATTRIBUTE_UNUSED,
 
     pool->def->allocation = pool->def->capacity = pool->def->available = 0;
 
-    virFileWaitForDevices();
+    virWaitForDevices();
 
     virStorageBackendGetMaps(pool);
 
index be1d4c61a8c587e64d9b955faf807d6526ad80d5..a6f3a6ae9c4f0e301388c6b2e570ce675fe4b0df 100644 (file)
@@ -347,7 +347,7 @@ createVport(virConnectPtr conn,
                            VPORT_CREATE) < 0)
         goto cleanup;
 
-    virFileWaitForDevices();
+    virWaitForDevices();
 
     /* Creating our own VPORT didn't leave enough time to find any LUN's,
      * so, let's create a thread whose job it is to call the FindLU's with
index bf6f0b31ef482977129105cf38b3ca5afdc1255a..38d373ec26c460e160d866dbfb7979d13d3a19d7 100644 (file)
@@ -4017,7 +4017,7 @@ virStorageBackendSCSIFindLUs(virStoragePoolObjPtr pool,
 
     VIR_DEBUG("Discovering LUs on host %u", scanhost);
 
-    virFileWaitForDevices();
+    virWaitForDevices();
 
     if (virDirOpen(&devicedir, device_path) < 0)
         return -1;
index f2a3faa158d36022711141419c452d57f234337c..b29feeeb1d87917eac914dfe2899cdf5a9db08ab 100644 (file)
@@ -292,8 +292,6 @@ int virFileOpenTty(int *ttymaster,
 
 char *virFileFindMountPoint(const char *type);
 
-void virFileWaitForDevices(void);
-
 /* NB: this should be combined with virFileBuildPath */
 # define virBuildPath(path, ...) \
     virBuildPathInternal(path, __VA_ARGS__, NULL)
index bb0f2d274b791752989ba0425cfe2df1605cd2df..79db1d8060419f500978e377743a682761af2a2e 100644 (file)
@@ -1582,7 +1582,7 @@ virSetUIDGIDWithCaps(uid_t uid, gid_t gid, gid_t *groups, int ngroups,
 
 
 #if defined(UDEVADM) || defined(UDEVSETTLE)
-void virFileWaitForDevices(void)
+void virWaitForDevices(void)
 {
 # ifdef UDEVADM
     const char *const settleprog[] = { UDEVADM, "settle", NULL };
@@ -1603,7 +1603,7 @@ void virFileWaitForDevices(void)
     ignore_value(virRun(settleprog, &exitstatus));
 }
 #else
-void virFileWaitForDevices(void)
+void virWaitForDevices(void)
 {}
 #endif
 
index 877207c4b58b495069a5fc4de1b8ba3c12689cbe..e097b77212fca3b0e8154091eef239453cdddee4 100644 (file)
@@ -51,6 +51,8 @@ int virSetUIDGIDWithCaps(uid_t uid, gid_t gid, gid_t *groups, int ngroups,
                          unsigned long long capBits,
                          bool clearExistingCaps);
 
+void virWaitForDevices(void);
+
 int virScaleInteger(unsigned long long *value, const char *suffix,
                     unsigned long long scale, unsigned long long limit)
     ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;