mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-21 19:02:25 +00:00
util: remove waitForLock from virPidFileAcquire
The parameter was added for consistency with virPidFileAcquirePath. However, all callers of virPidFileAcquire pass false. Remove the argument. Partially-reverts: 2250a2b5d21c3b3529727f38a99cba22f84024f7 Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
parent
e8a83aab5d
commit
1cc783bc44
@ -1247,7 +1247,7 @@ bhyveStateInitialize(bool privileged,
|
||||
}
|
||||
|
||||
if ((bhyve_driver->lockFD =
|
||||
virPidFileAcquire(BHYVE_STATE_DIR, "driver", false, getpid())) < 0)
|
||||
virPidFileAcquire(BHYVE_STATE_DIR, "driver", getpid())) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (virDomainObjListLoadAllConfigs(bhyve_driver->domains,
|
||||
|
@ -123,7 +123,7 @@ netcfStateInitialize(bool privileged,
|
||||
}
|
||||
|
||||
if ((driver->lockFD =
|
||||
virPidFileAcquire(driver->stateDir, "driver", false, getpid())) < 0)
|
||||
virPidFileAcquire(driver->stateDir, "driver", getpid())) < 0)
|
||||
goto error;
|
||||
|
||||
/* open netcf */
|
||||
|
@ -1136,7 +1136,7 @@ udevStateInitialize(bool privileged,
|
||||
}
|
||||
|
||||
if ((driver->lockFD =
|
||||
virPidFileAcquire(driver->stateDir, "driver", false, getpid())) < 0)
|
||||
virPidFileAcquire(driver->stateDir, "driver", getpid())) < 0)
|
||||
goto cleanup;
|
||||
|
||||
driver->udev = udev_new();
|
||||
|
@ -751,7 +751,7 @@ libxlStateInitialize(bool privileged,
|
||||
}
|
||||
|
||||
if ((libxl_driver->lockFD =
|
||||
virPidFileAcquire(cfg->stateDir, "driver", false, getpid())) < 0)
|
||||
virPidFileAcquire(cfg->stateDir, "driver", getpid())) < 0)
|
||||
goto error;
|
||||
|
||||
if (!(libxl_driver->lockManager =
|
||||
|
@ -1505,7 +1505,7 @@ static int lxcStateInitialize(bool privileged,
|
||||
}
|
||||
|
||||
if ((lxc_driver->lockFD =
|
||||
virPidFileAcquire(cfg->stateDir, "driver", false, getpid())) < 0)
|
||||
virPidFileAcquire(cfg->stateDir, "driver", getpid())) < 0)
|
||||
goto cleanup;
|
||||
|
||||
/* Get all the running persistent or transient configs first */
|
||||
|
@ -608,8 +608,7 @@ networkStateInitialize(bool privileged,
|
||||
goto error;
|
||||
|
||||
if ((network_driver->lockFD =
|
||||
virPidFileAcquire(cfg->stateDir, "driver",
|
||||
false, getpid())) < 0)
|
||||
virPidFileAcquire(cfg->stateDir, "driver", getpid())) < 0)
|
||||
goto error;
|
||||
|
||||
/* if this fails now, it will be retried later with networkDnsmasqCapsRefresh() */
|
||||
|
@ -2278,7 +2278,7 @@ nodeStateInitialize(bool privileged,
|
||||
}
|
||||
|
||||
if ((driver->lockFD =
|
||||
virPidFileAcquire(driver->stateDir, "driver", false, getpid())) < 0)
|
||||
virPidFileAcquire(driver->stateDir, "driver", getpid())) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (!(driver->devs = virNodeDeviceObjListNew()) ||
|
||||
|
@ -254,7 +254,7 @@ nwfilterStateInitialize(bool privileged,
|
||||
}
|
||||
|
||||
if ((driver->lockFD =
|
||||
virPidFileAcquire(driver->stateDir, "driver", false, getpid())) < 0)
|
||||
virPidFileAcquire(driver->stateDir, "driver", getpid())) < 0)
|
||||
goto error;
|
||||
|
||||
if (virNWFilterIPAddrMapInit() < 0)
|
||||
|
@ -678,7 +678,7 @@ qemuStateInitialize(bool privileged,
|
||||
}
|
||||
|
||||
if ((qemu_driver->lockFD =
|
||||
virPidFileAcquire(cfg->stateDir, "driver", false, getpid())) < 0)
|
||||
virPidFileAcquire(cfg->stateDir, "driver", getpid())) < 0)
|
||||
goto error;
|
||||
|
||||
qemu_driver->qemuImgBinary = virFindFileInPath("qemu-img");
|
||||
|
@ -536,7 +536,7 @@ secretStateInitialize(bool privileged,
|
||||
}
|
||||
|
||||
if ((driver->lockFD =
|
||||
virPidFileAcquire(driver->stateDir, "driver", false, getpid())) < 0)
|
||||
virPidFileAcquire(driver->stateDir, "driver", getpid())) < 0)
|
||||
goto error;
|
||||
|
||||
if (!(driver->secrets = virSecretObjListNew()))
|
||||
|
@ -289,8 +289,7 @@ storageStateInitialize(bool privileged,
|
||||
}
|
||||
|
||||
if ((driver->lockFD =
|
||||
virPidFileAcquire(driver->stateDir, "driver",
|
||||
false, getpid())) < 0)
|
||||
virPidFileAcquire(driver->stateDir, "driver", getpid())) < 0)
|
||||
goto error;
|
||||
|
||||
if (virStoragePoolObjLoadAllState(driver->pools,
|
||||
|
@ -447,7 +447,6 @@ int virPidFileAcquirePath(const char *path,
|
||||
|
||||
int virPidFileAcquire(const char *dir,
|
||||
const char *name,
|
||||
bool waitForLock,
|
||||
pid_t pid)
|
||||
{
|
||||
g_autofree char *pidfile = NULL;
|
||||
@ -458,7 +457,7 @@ int virPidFileAcquire(const char *dir,
|
||||
if (!(pidfile = virPidFileBuildPath(dir, name)))
|
||||
return -ENOMEM;
|
||||
|
||||
return virPidFileAcquirePath(pidfile, waitForLock, pid);
|
||||
return virPidFileAcquirePath(pidfile, false, pid);
|
||||
}
|
||||
|
||||
|
||||
|
@ -61,7 +61,6 @@ int virPidFileAcquirePath(const char *path,
|
||||
pid_t pid) G_GNUC_WARN_UNUSED_RESULT;
|
||||
int virPidFileAcquire(const char *dir,
|
||||
const char *name,
|
||||
bool waitForLock,
|
||||
pid_t pid) G_GNUC_WARN_UNUSED_RESULT;
|
||||
|
||||
int virPidFileReleasePath(const char *path,
|
||||
|
@ -4097,7 +4097,7 @@ vzStateInitialize(bool privileged,
|
||||
}
|
||||
|
||||
if ((vz_driver_lock_fd =
|
||||
virPidFileAcquire(VZ_STATEDIR, "driver", false, getpid())) < 0)
|
||||
virPidFileAcquire(VZ_STATEDIR, "driver", getpid())) < 0)
|
||||
return VIR_DRV_STATE_INIT_ERROR;
|
||||
|
||||
if (prlsdkInit() < 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user