[PATCH 06/14] qemu: pass priv data to qemuBuildMonitorCommandLine

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

 



Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
---
 src/qemu/qemu_command.c | 23 ++++++++---------------
 1 file changed, 8 insertions(+), 15 deletions(-)

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 935b05226d..fa70d15c43 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -5609,20 +5609,17 @@ qemuBuildMonitorCommandLine(virLogManagerPtr logManager,
                             virCommandPtr cmd,
                             virQEMUDriverConfigPtr cfg,
                             virDomainDefPtr def,
-                            virQEMUCapsPtr qemuCaps,
-                            virDomainChrSourceDefPtr monitor_chr,
-                            bool monitor_json,
-                            bool chardevStdioLogd)
+                            qemuDomainObjPrivatePtr priv)
 {
     char *chrdev;
 
-    if (!monitor_chr)
+    if (!priv->monConfig)
         return 0;
 
     if (!(chrdev = qemuBuildChrChardevStr(logManager, cmd, cfg, def,
-                                          monitor_chr, "monitor",
-                                          qemuCaps, true,
-                                          chardevStdioLogd)))
+                                          priv->monConfig, "monitor",
+                                          priv->qemuCaps, true,
+                                          priv->chardevStdioLogd)))
         return -1;
     virCommandAddArg(cmd, "-chardev");
     virCommandAddArg(cmd, chrdev);
@@ -5631,7 +5628,7 @@ qemuBuildMonitorCommandLine(virLogManagerPtr logManager,
     virCommandAddArg(cmd, "-mon");
     virCommandAddArgFormat(cmd,
                            "chardev=charmonitor,id=monitor,mode=%s",
-                           monitor_json ? "control" : "readline");
+                           priv->monJSON ? "control" : "readline");
 
     return 0;
 }
@@ -9963,7 +9960,6 @@ qemuBuildCommandLine(virQEMUDriverPtr driver,
     unsigned int bootHostdevNet = 0;
     qemuDomainObjPrivatePtr priv = vm->privateData;
     virDomainDefPtr def = vm->def;
-    virDomainChrSourceDefPtr monitor_chr = priv->monConfig;
     bool monitor_json = priv->monJSON;
     virQEMUCapsPtr qemuCaps = priv->qemuCaps;
     virBitmapPtr nodeset = priv->autoNodeset;
@@ -9972,7 +9968,7 @@ qemuBuildCommandLine(virQEMUDriverPtr driver,
 
     VIR_DEBUG("driver=%p def=%p mon=%p json=%d "
               "qemuCaps=%p migrateURI=%s snapshot=%p vmop=%d",
-              driver, def, monitor_chr, monitor_json,
+              driver, def, priv->monConfig, monitor_json,
               qemuCaps, migrateURI, snapshot, vmop);
 
     if (qemuBuildCommandLineValidate(driver, def) < 0)
@@ -10066,10 +10062,7 @@ qemuBuildCommandLine(virQEMUDriverPtr driver,
     if (qemuBuildSgaCommandLine(cmd, def, qemuCaps) < 0)
         goto error;
 
-    if (qemuBuildMonitorCommandLine(logManager, cmd, cfg, def,
-                                    qemuCaps, monitor_chr,
-                                    monitor_json,
-                                    chardevStdioLogd) < 0)
+    if (qemuBuildMonitorCommandLine(logManager, cmd, cfg, def, priv) < 0)
         goto error;
 
     if (qemuBuildClockCommandLine(cmd, def, qemuCaps) < 0)
-- 
2.13.6

--
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