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(a)redhat.com>
---
src/libvirt_private.syms | 2 +-
src/node_device/node_device_driver.c | 2 +-
src/storage/storage_backend_disk.c | 6 +++---
src/storage/storage_backend_iscsi.c | 2 +-
src/storage/storage_backend_logical.c | 4 ++--
src/storage/storage_backend_mpath.c | 2 +-
src/storage/storage_backend_scsi.c | 2 +-
src/storage/storage_util.c | 2 +-
src/util/virfile.h | 2 --
src/util/virutil.c | 4 ++--
src/util/virutil.h | 2 ++
11 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index b88e700..563d6f6 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -1628,7 +1628,6 @@ virFileStripSuffix;
virFileTouch;
virFileUnlock;
virFileUpdatePerm;
-virFileWaitForDevices;
virFileWrapperFdClose;
virFileWrapperFdFree;
virFileWrapperFdNew;
@@ -2743,6 +2742,7 @@ virTristateSwitchTypeFromString;
virTristateSwitchTypeToString;
virUpdateSelfLastChanged;
virValidateWWN;
+virWaitForDevices;
# util/viruuid.h
diff --git a/src/node_device/node_device_driver.c b/src/node_device/node_device_driver.c
index 5d57006..fcb5644 100644
--- a/src/node_device/node_device_driver.c
+++ b/src/node_device/node_device_driver.c
@@ -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);
diff --git a/src/storage/storage_backend_disk.c b/src/storage/storage_backend_disk.c
index 819f1e5..75d8f63 100644
--- a/src/storage/storage_backend_disk.c
+++ b/src/storage/storage_backend_disk.c
@@ -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);
diff --git a/src/storage/storage_backend_iscsi.c b/src/storage/storage_backend_iscsi.c
index 2813341..4a5563a 100644
--- a/src/storage/storage_backend_iscsi.c
+++ b/src/storage/storage_backend_iscsi.c
@@ -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;
diff --git a/src/storage/storage_backend_logical.c
b/src/storage/storage_backend_logical.c
index b0191aa..2acd0ef 100644
--- a/src/storage/storage_backend_logical.c
+++ b/src/storage/storage_backend_logical.c
@@ -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);
diff --git a/src/storage/storage_backend_mpath.c b/src/storage/storage_backend_mpath.c
index a5d692a..501e316 100644
--- a/src/storage/storage_backend_mpath.c
+++ b/src/storage/storage_backend_mpath.c
@@ -261,7 +261,7 @@ virStorageBackendMpathRefreshPool(virConnectPtr conn
ATTRIBUTE_UNUSED,
pool->def->allocation = pool->def->capacity = pool->def->available
= 0;
- virFileWaitForDevices();
+ virWaitForDevices();
virStorageBackendGetMaps(pool);
diff --git a/src/storage/storage_backend_scsi.c b/src/storage/storage_backend_scsi.c
index afc3c89..33df1c9 100644
--- a/src/storage/storage_backend_scsi.c
+++ b/src/storage/storage_backend_scsi.c
@@ -343,7 +343,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
diff --git a/src/storage/storage_util.c b/src/storage/storage_util.c
index a665bac..64fc843 100644
--- a/src/storage/storage_util.c
+++ b/src/storage/storage_util.c
@@ -4012,7 +4012,7 @@ virStorageBackendSCSIFindLUs(virStoragePoolObjPtr pool,
VIR_DEBUG("Discovering LUs on host %u", scanhost);
- virFileWaitForDevices();
+ virWaitForDevices();
if (virDirOpen(&devicedir, device_path) < 0)
return -1;
diff --git a/src/util/virfile.h b/src/util/virfile.h
index f2a3faa..b29feee 100644
--- a/src/util/virfile.h
+++ b/src/util/virfile.h
@@ -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)
diff --git a/src/util/virutil.c b/src/util/virutil.c
index bb0f2d2..79db1d8 100644
--- a/src/util/virutil.c
+++ b/src/util/virutil.c
@@ -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
diff --git a/src/util/virutil.h b/src/util/virutil.h
index 877207c..e097b77 100644
--- a/src/util/virutil.h
+++ b/src/util/virutil.h
@@ -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;
--
2.9.3