From: Jiri Denemark Date: Thu, 2 Aug 2012 13:41:23 +0000 (+0200) Subject: daemon: Portable auto-detection of driver module directory X-Git-Tag: v0.10.0-rc1~227 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b5c5ad365eab2f5e13df9c4c067d202620cb8faf;p=thirdparty%2Flibvirt.git daemon: Portable auto-detection of driver module directory When running libvirtd from a build directory on a system with unmodified libtool, libvirtd's binary is not renamed as "lt-libvirtd". Check for "/daemon/.libs/libvirtd" in addition to "lt-libvirtd". --- diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c index ba0cc1f290..49b69ef8ce 100644 --- a/daemon/libvirtd.c +++ b/daemon/libvirtd.c @@ -972,7 +972,8 @@ int main(int argc, char **argv) { virLogSetFromEnv(); #ifdef WITH_DRIVER_MODULES - if (strstr(argv[0], "lt-libvirtd")) { + if (strstr(argv[0], "lt-libvirtd") || + strstr(argv[0], "/daemon/.libs/libvirtd")) { char *tmp = strrchr(argv[0], '/'); if (!tmp) { fprintf(stderr, _("%s: cannot identify driver directory\n"), argv[0]);