提交 84866115 编写于 作者: D Daniel P. Berrangé

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: NErik Skultety <eskultet@redhat.com>
Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
上级 cb1938eb
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册