From 391ac4d99078401381d3e926beb19886e596690c Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Thu, 24 Apr 2014 15:57:36 +0100 Subject: [PATCH] Activate build dir overrides in libvirtd, virtlockd, virsh & tests Add calls to virFileActivateDirOverride so that the build dir overrides are activated. Signed-off-by: Daniel P. Berrange --- daemon/libvirtd.c | 2 ++ src/locking/lock_daemon.c | 2 ++ tests/testutils.c | 2 ++ tools/virsh.c | 2 ++ 4 files changed, 8 insertions(+) diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c index e197db4407..b4e9c1ff76 100644 --- a/daemon/libvirtd.c +++ b/daemon/libvirtd.c @@ -1156,6 +1156,8 @@ int main(int argc, char **argv) { virUpdateSelfLastChanged(argv[0]); + virFileActivateDirOverride(argv[0]); + if (strstr(argv[0], "lt-libvirtd") || strstr(argv[0], "/daemon/.libs/libvirtd")) { char *tmp = strrchr(argv[0], '/'); diff --git a/src/locking/lock_daemon.c b/src/locking/lock_daemon.c index 455cc88094..969f901f7f 100644 --- a/src/locking/lock_daemon.c +++ b/src/locking/lock_daemon.c @@ -1271,6 +1271,8 @@ int main(int argc, char **argv) { } } + virFileActivateDirOverride(argv[0]); + if (!(config = virLockDaemonConfigNew(privileged))) { VIR_ERROR(_("Can't create initial configuration")); exit(EXIT_FAILURE); diff --git a/tests/testutils.c b/tests/testutils.c index 9767a782f5..7d27582f5a 100644 --- a/tests/testutils.c +++ b/tests/testutils.c @@ -678,6 +678,8 @@ int virtTestMain(int argc, char *oomstr; #endif + virFileActivateDirOverride(argv[0]); + if (!virFileExists(abs_srcdir)) return EXIT_AM_HARDFAIL; diff --git a/tools/virsh.c b/tools/virsh.c index 28af3c36e2..15f30252d1 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -3594,6 +3594,8 @@ main(int argc, char **argv) return EXIT_FAILURE; } + virFileActivateDirOverride(argv[0]); + if (!(progname = strrchr(argv[0], '/'))) progname = argv[0]; else