mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-29 20:11:16 +00:00
interface: fix driver name in state directory path
Typo meant we use 'nodedev' instead of 'interface'. This doesn't hurt libvirtd because if a process tries to acquire a lock it already holds it will succeed. It fails when nodedev & interface drivers are in separate daemons though. Reviewed-by: Erik Skultety <eskultet@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
cb1938eb58
commit
8486611548
@ -102,14 +102,14 @@ netcfStateInitialize(bool privileged,
|
|||||||
|
|
||||||
if (privileged) {
|
if (privileged) {
|
||||||
if (virAsprintf(&driver->stateDir,
|
if (virAsprintf(&driver->stateDir,
|
||||||
"%s/run/libvirt/nodedev", LOCALSTATEDIR) < 0)
|
"%s/run/libvirt/interface", LOCALSTATEDIR) < 0)
|
||||||
goto error;
|
goto error;
|
||||||
} else {
|
} else {
|
||||||
VIR_AUTOFREE(char *) rundir = NULL;
|
VIR_AUTOFREE(char *) rundir = NULL;
|
||||||
|
|
||||||
if (!(rundir = virGetUserRuntimeDirectory()))
|
if (!(rundir = virGetUserRuntimeDirectory()))
|
||||||
goto error;
|
goto error;
|
||||||
if (virAsprintf(&driver->stateDir, "%s/nodedev/run", rundir) < 0)
|
if (virAsprintf(&driver->stateDir, "%s/interface/run", rundir) < 0)
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1181,14 +1181,14 @@ udevStateInitialize(bool privileged,
|
|||||||
|
|
||||||
if (privileged) {
|
if (privileged) {
|
||||||
if (virAsprintf(&driver->stateDir,
|
if (virAsprintf(&driver->stateDir,
|
||||||
"%s/run/libvirt/nodedev", LOCALSTATEDIR) < 0)
|
"%s/run/libvirt/interface", LOCALSTATEDIR) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
} else {
|
} else {
|
||||||
VIR_AUTOFREE(char *) rundir = NULL;
|
VIR_AUTOFREE(char *) rundir = NULL;
|
||||||
|
|
||||||
if (!(rundir = virGetUserRuntimeDirectory()))
|
if (!(rundir = virGetUserRuntimeDirectory()))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
if (virAsprintf(&driver->stateDir, "%s/nodedev/run", rundir) < 0)
|
if (virAsprintf(&driver->stateDir, "%s/interface/run", rundir) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user