]> xenbits.xensource.com Git - libvirt.git/commitdiff
Detect location of qemu-bridge-helper
authorGuido Günther <agx@sigxcpu.org>
Thu, 13 Aug 2015 10:20:29 +0000 (12:20 +0200)
committerGuido Günther <agx@sigxcpu.org>
Thu, 13 Aug 2015 19:31:55 +0000 (21:31 +0200)
RedHat and Debian based distros use different locations

Reference: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=790935

configure.ac
src/qemu/qemu_conf.c

index 46c80ce43e7a030612658b12e3495b9e86bf95ff..965858be833f6a810d671cd29ed889f854f5df1e 100644 (file)
@@ -2523,6 +2523,9 @@ AC_ARG_WITH([qemu-group],
 AC_DEFINE_UNQUOTED([QEMU_USER], ["$QEMU_USER"], [QEMU user account])
 AC_DEFINE_UNQUOTED([QEMU_GROUP], ["$QEMU_GROUP"], [QEMU group account])
 
+AC_PATH_PROG([QEMU_BRIDGE_HELPER], [qemu-bridge-helper], [/usr/libexec/qemu-bridge-helper],
+                  [/usr/libexec:/usr/lib/qemu])
+AC_DEFINE_UNQUOTED([QEMU_BRIDGE_HELPER], ["$QEMU_BRIDGE_HELPER"], [QEMU bridge helper])
 
 AC_ARG_WITH([macvtap],
   [AS_HELP_STRING([--with-macvtap],
index da26c2d80e46164754efaadc1f427f2b0923e1e2..1ce459f09a7d4a3e18fab33843e7d8ef6872ee67 100644 (file)
@@ -295,7 +295,7 @@ virQEMUDriverConfigPtr virQEMUDriverConfigNew(bool privileged)
             goto error;
     }
 
-    if (VIR_STRDUP(cfg->bridgeHelperName, "/usr/libexec/qemu-bridge-helper") < 0)
+    if (VIR_STRDUP(cfg->bridgeHelperName, QEMU_BRIDGE_HELPER) < 0)
         goto error;
 
     cfg->clearEmulatorCapabilities = true;