Rename the 'wait' parameter to 'loop'.
This silences the warning:
storage/storage_backend.c:1348:34: error: declaration of 'wait' shadows
a global declaration [-Werror=shadow]
and fixes the build with -Werror.
--
Note: loop is pool backwards.
* Typically target.path is one of the /dev/disk/by-XXX dirs
* with stable paths.
*
- * If 'wait' is true, we use a timeout loop to give dynamic paths
+ * If 'loop' is true, we use a timeout loop to give dynamic paths
* a change to appear.
*/
char *
virStorageBackendStablePath(virStoragePoolObjPtr pool,
const char *devpath,
- bool wait)
+ bool loop)
{
DIR *dh;
struct dirent *dent;
reopen:
if ((dh = opendir(pool->def->target.path)) == NULL) {
opentries++;
- if (wait && errno == ENOENT && opentries < 50) {
+ if (loop && errno == ENOENT && opentries < 50) {
usleep(100 * 1000);
goto reopen;
}
VIR_FREE(stablepath);
}
- if (wait && ++retry < 100) {
+ if (loop && ++retry < 100) {
usleep(100 * 1000);
goto retry;
}
char *virStorageBackendStablePath(virStoragePoolObjPtr pool,
const char *devpath,
- bool wait);
+ bool loop);
typedef int (*virStorageBackendListVolRegexFunc)(virStoragePoolObjPtr pool,
char **const groups,