mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-10 23:07:44 +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 (virAsprintf(&driver->stateDir,
|
||||
"%s/run/libvirt/nodedev", LOCALSTATEDIR) < 0)
|
||||
"%s/run/libvirt/interface", LOCALSTATEDIR) < 0)
|
||||
goto error;
|
||||
} else {
|
||||
VIR_AUTOFREE(char *) rundir = NULL;
|
||||
|
||||
if (!(rundir = virGetUserRuntimeDirectory()))
|
||||
goto error;
|
||||
if (virAsprintf(&driver->stateDir, "%s/nodedev/run", rundir) < 0)
|
||||
if (virAsprintf(&driver->stateDir, "%s/interface/run", rundir) < 0)
|
||||
goto error;
|
||||
}
|
||||
|
||||
|
@ -1181,14 +1181,14 @@ udevStateInitialize(bool privileged,
|
||||
|
||||
if (privileged) {
|
||||
if (virAsprintf(&driver->stateDir,
|
||||
"%s/run/libvirt/nodedev", LOCALSTATEDIR) < 0)
|
||||
"%s/run/libvirt/interface", LOCALSTATEDIR) < 0)
|
||||
goto cleanup;
|
||||
} else {
|
||||
VIR_AUTOFREE(char *) rundir = NULL;
|
||||
|
||||
if (!(rundir = virGetUserRuntimeDirectory()))
|
||||
goto cleanup;
|
||||
if (virAsprintf(&driver->stateDir, "%s/nodedev/run", rundir) < 0)
|
||||
if (virAsprintf(&driver->stateDir, "%s/interface/run", rundir) < 0)
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user