[PATCH 07/23] qemu-conf: add configurable dbus-daemon location

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx>

Signed-off-by: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx>
---
 m4/virt-driver-qemu.m4             | 5 +++++
 src/qemu/libvirtd_qemu.aug         | 1 +
 src/qemu/qemu.conf                 | 3 +++
 src/qemu/qemu_conf.c               | 7 ++++++-
 src/qemu/qemu_conf.h               | 1 +
 src/qemu/test_libvirtd_qemu.aug.in | 1 +
 6 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/m4/virt-driver-qemu.m4 b/m4/virt-driver-qemu.m4
index a1d05bbd7f..1bc1755620 100644
--- a/m4/virt-driver-qemu.m4
+++ b/m4/virt-driver-qemu.m4
@@ -105,6 +105,11 @@ AC_DEFUN([LIBVIRT_DRIVER_CHECK_QEMU], [
                [/usr/bin:/usr/libexec])
   AC_DEFINE_UNQUOTED([QEMU_PR_HELPER], ["$QEMU_PR_HELPER"],
                      [QEMU PR helper])
+  AC_PATH_PROG([QEMU_DBUS_DAEMON], [dbus-daemon],
+               [/usr/bin/dbus-daemon],
+               [/usr/bin:/usr/libexec])
+  AC_DEFINE_UNQUOTED([QEMU_DBUS_DAEMON], ["$QEMU_DBUS_DAEMON"],
+                     [QEMU dbus daemon])
 ])
 
 AC_DEFUN([LIBVIRT_DRIVER_RESULT_QEMU], [
diff --git a/src/qemu/libvirtd_qemu.aug b/src/qemu/libvirtd_qemu.aug
index eea9094d39..ba4caabc42 100644
--- a/src/qemu/libvirtd_qemu.aug
+++ b/src/qemu/libvirtd_qemu.aug
@@ -89,6 +89,7 @@ module Libvirtd_qemu =
                  | bool_entry "clear_emulator_capabilities"
                  | str_entry "bridge_helper"
                  | str_entry "pr_helper"
+                 | str_entry "dbus_daemon"
                  | bool_entry "set_process_name"
                  | int_entry "max_processes"
                  | int_entry "max_files"
diff --git a/src/qemu/qemu.conf b/src/qemu/qemu.conf
index fd2ed9dc21..26bab39123 100644
--- a/src/qemu/qemu.conf
+++ b/src/qemu/qemu.conf
@@ -823,6 +823,9 @@
 # used whenever <reservations/> are enabled for SCSI LUN devices.
 #pr_helper = "/usr/bin/qemu-pr-helper"
 
+# Path to the dbus-daemon
+#dbus_daemon = "/usr/bin/dbus-daemon"
+
 # User for the swtpm TPM Emulator
 #
 # Default is 'tss'; this is the same user that tcsd (TrouSerS) installs
diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
index e0195dac29..6f15ce2086 100644
--- a/src/qemu/qemu_conf.c
+++ b/src/qemu/qemu_conf.c
@@ -278,7 +278,8 @@ virQEMUDriverConfigPtr virQEMUDriverConfigNew(bool privileged)
     }
 
     if (VIR_STRDUP(cfg->bridgeHelperName, QEMU_BRIDGE_HELPER) < 0 ||
-        VIR_STRDUP(cfg->prHelperName, QEMU_PR_HELPER) < 0)
+        VIR_STRDUP(cfg->prHelperName, QEMU_PR_HELPER) < 0 ||
+        VIR_STRDUP(cfg->dbusDaemonName, QEMU_DBUS_DAEMON) < 0)
         goto error;
 
     cfg->clearEmulatorCapabilities = true;
@@ -368,6 +369,7 @@ static void virQEMUDriverConfigDispose(void *obj)
     VIR_FREE(cfg->hugetlbfs);
     VIR_FREE(cfg->bridgeHelperName);
     VIR_FREE(cfg->prHelperName);
+    VIR_FREE(cfg->dbusDaemonName);
 
     VIR_FREE(cfg->saveImageFormat);
     VIR_FREE(cfg->dumpImageFormat);
@@ -664,6 +666,9 @@ virQEMUDriverConfigLoadProcessEntry(virQEMUDriverConfigPtr cfg,
     if (virConfGetValueString(conf, "pr_helper", &cfg->prHelperName) < 0)
         return -1;
 
+    if (virConfGetValueString(conf, "dbus_daemon", &cfg->dbusDaemonName) < 0)
+        return -1;
+
     if (virConfGetValueBool(conf, "set_process_name", &cfg->setProcessName) < 0)
         return -1;
     if (virConfGetValueUInt(conf, "max_processes", &cfg->maxProcesses) < 0)
diff --git a/src/qemu/qemu_conf.h b/src/qemu/qemu_conf.h
index e51514a344..0799846001 100644
--- a/src/qemu/qemu_conf.h
+++ b/src/qemu/qemu_conf.h
@@ -151,6 +151,7 @@ struct _virQEMUDriverConfig {
 
     char *bridgeHelperName;
     char *prHelperName;
+    char *dbusDaemonName;
 
     bool macFilter;
 
diff --git a/src/qemu/test_libvirtd_qemu.aug.in b/src/qemu/test_libvirtd_qemu.aug.in
index 388ba24b8b..e135869717 100644
--- a/src/qemu/test_libvirtd_qemu.aug.in
+++ b/src/qemu/test_libvirtd_qemu.aug.in
@@ -103,6 +103,7 @@ module Test_libvirtd_qemu =
 }
 { "memory_backing_dir" = "/var/lib/libvirt/qemu/ram" }
 { "pr_helper" = "/usr/bin/qemu-pr-helper" }
+{ "dbus_daemon" = "/usr/bin/dbus-daemon" }
 { "swtpm_user" = "tss" }
 { "swtpm_group" = "tss" }
 { "capability_filters"
-- 
2.22.0.214.g8dca754b1e

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux