[PATCH 3/8] qemu: Fix domainLogContextNew invocations in qemu driver

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

 



Fix the invocations of domainLogContextNew in qemu driver to use
hypervisor agnostic arguments.

Signed-off-by: Praveen K Paladugu <praveenkpaladugu@xxxxxxxxx>
---
 src/qemu/qemu_nbdkit.c  | 6 +++++-
 src/qemu/qemu_process.c | 8 +++++---
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/src/qemu/qemu_nbdkit.c b/src/qemu/qemu_nbdkit.c
index de7c62a037..65c98de017 100644
--- a/src/qemu/qemu_nbdkit.c
+++ b/src/qemu/qemu_nbdkit.c
@@ -1177,6 +1177,7 @@ qemuNbdkitProcessStart(qemuNbdkitProcess *proc,
                        virQEMUDriver *driver)
 {
     g_autoptr(virCommand) cmd = NULL;
+    g_autoptr(virQEMUDriverConfig) cfg = virQEMUDriverGetConfig(driver);
     int rc;
     int exitstatus = 0;
     g_autofree char *errbuf = NULL;
@@ -1200,7 +1201,10 @@ qemuNbdkitProcessStart(qemuNbdkitProcess *proc,
     if (!(cmd = qemuNbdkitProcessBuildCommand(proc)))
         return -1;
 
-    if (!(logContext = domainLogContextNew(driver, vm, basename))) {
+    if (!(logContext = domainLogContextNew(cfg->stdioLogD, cfg->logDir,
+                                           QEMU_DRIVER_NAME,
+                                           vm, driver->privileged,
+                                           basename))) {
         virLastErrorPrefixMessage("%s", _("can't connect to virtlogd"));
         return -1;
     }
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index d182206f20..d02105cf44 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -4755,8 +4755,7 @@ qemuLogOperation(virDomainObj *vm,
         return;
 
     if (domainLogContextWrite(logCtxt,
-                              "%s: %s %s, qemu version: %d.%d.%d%s, kernel: %s,
-                              hostname: %s\n",
+                              "%s: %s %s, qemu version: %d.%d.%d%s, kernel: %s, hostname: %s\n",
                               timestamp, msg, VIR_LOG_VERSION_STRING,
                               (qemuVersion / 1000000) % 1000,
                               (qemuVersion / 1000) % 1000,
@@ -7816,7 +7815,10 @@ qemuProcessLaunch(virConnectPtr conn,
     hookData.cfg = cfg;
 
     VIR_DEBUG("Creating domain log file");
-    if (!(logCtxt = domainLogContextNew(driver, vm, vm->def->name))) {
+    if (!(logCtxt = domainLogContextNew(cfg->stdioLogD, cfg->logDir,
+                                        QEMU_DRIVER_NAME,
+                                        vm, driver->privileged,
+                                        vm->def->name))) {
         virLastErrorPrefixMessage("%s", _("can't connect to virtlogd"));
         goto cleanup;
     }
-- 
2.47.0



[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