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>
virFileTouch;
virFileUnlock;
virFileUpdatePerm;
-virFileWaitForDevices;
virFileWrapperFdClose;
virFileWrapperFdFree;
virFileWrapperFdNew;
virTristateSwitchTypeToString;
virUpdateSelfLastChanged;
virValidateWWN;
+virWaitForDevices;
# util/viruuid.h
while ((now - start) < LINUX_NEW_DEVICE_WAIT_TIME) {
- virFileWaitForDevices();
+ virWaitForDevices();
dev = nodeDeviceLookupSCSIHostByWWN(conn, wwnn, wwpn, 0);
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,
virStoragePoolFormatDiskTypeToString(pool->def->source.format);
const char *path = pool->def->source.devices[0].path;
- virFileWaitForDevices();
+ virWaitForDevices();
if (!virFileExists(path)) {
virReportError(VIR_ERR_INVALID_ARG,
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);
VIR_DEBUG("Finding host number from '%s'", sysfs_path);
- virFileWaitForDevices();
+ virWaitForDevices();
if (virDirOpen(&sysdir, sysfs_path) < 0)
goto cleanup;
virCommandPtr cmd = NULL;
int ret = -1;
- virFileWaitForDevices();
+ virWaitForDevices();
/* Get list of all logical volumes */
if (virStorageBackendLogicalFindLVs(pool, NULL) < 0)
virCheckFlags(0, -1);
- virFileWaitForDevices();
+ virWaitForDevices();
lvchange_cmd = virCommandNewArgList(LVCHANGE, "-aln", vol->target.path, NULL);
lvremove_cmd = virCommandNewArgList(LVREMOVE, "-f", vol->target.path, NULL);
pool->def->allocation = pool->def->capacity = pool->def->available = 0;
- virFileWaitForDevices();
+ virWaitForDevices();
virStorageBackendGetMaps(pool);
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
VIR_DEBUG("Discovering LUs on host %u", scanhost);
- virFileWaitForDevices();
+ virWaitForDevices();
if (virDirOpen(&devicedir, device_path) < 0)
return -1;
char *virFileFindMountPoint(const char *type);
-void virFileWaitForDevices(void);
-
/* NB: this should be combined with virFileBuildPath */
# define virBuildPath(path, ...) \
virBuildPathInternal(path, __VA_ARGS__, NULL)
#if defined(UDEVADM) || defined(UDEVSETTLE)
-void virFileWaitForDevices(void)
+void virWaitForDevices(void)
{
# ifdef UDEVADM
const char *const settleprog[] = { UDEVADM, "settle", NULL };
ignore_value(virRun(settleprog, &exitstatus));
}
#else
-void virFileWaitForDevices(void)
+void virWaitForDevices(void)
{}
#endif
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;