[PATCH 07/14] qemu: pass priv data to qemuBuildPMCommandLine

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

 



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

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index fa70d15c43..da59a1fd63 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -6485,10 +6485,10 @@ qemuBuildClockCommandLine(virCommandPtr cmd,
 static int
 qemuBuildPMCommandLine(virCommandPtr cmd,
                        const virDomainDef *def,
-                       virQEMUCapsPtr qemuCaps,
-                       bool monitor_json)
+                       qemuDomainObjPrivatePtr priv)
 {
     bool allowReboot = true;
+    virQEMUCapsPtr qemuCaps = priv->qemuCaps;
 
     /* Only add -no-reboot option if each event destroys domain */
     if (def->onReboot == VIR_DOMAIN_LIFECYCLE_ACTION_DESTROY &&
@@ -6503,7 +6503,7 @@ qemuBuildPMCommandLine(virCommandPtr cmd,
      * when QEMU stops. If we use no-shutdown, then we can
      * watch for this event and do a soft/warm reboot.
      */
-    if (monitor_json && allowReboot &&
+    if (priv->monJSON && allowReboot &&
         virQEMUCapsGet(qemuCaps, QEMU_CAPS_NO_SHUTDOWN)) {
         virCommandAddArg(cmd, "-no-shutdown");
     }
@@ -9960,7 +9960,6 @@ qemuBuildCommandLine(virQEMUDriverPtr driver,
     unsigned int bootHostdevNet = 0;
     qemuDomainObjPrivatePtr priv = vm->privateData;
     virDomainDefPtr def = vm->def;
-    bool monitor_json = priv->monJSON;
     virQEMUCapsPtr qemuCaps = priv->qemuCaps;
     virBitmapPtr nodeset = priv->autoNodeset;
     const char *domainLibDir = priv->libDir;
@@ -9968,7 +9967,7 @@ qemuBuildCommandLine(virQEMUDriverPtr driver,
 
     VIR_DEBUG("driver=%p def=%p mon=%p json=%d "
               "qemuCaps=%p migrateURI=%s snapshot=%p vmop=%d",
-              driver, def, priv->monConfig, monitor_json,
+              driver, def, priv->monConfig, priv->monJSON,
               qemuCaps, migrateURI, snapshot, vmop);
 
     if (qemuBuildCommandLineValidate(driver, def) < 0)
@@ -10068,7 +10067,7 @@ qemuBuildCommandLine(virQEMUDriverPtr driver,
     if (qemuBuildClockCommandLine(cmd, def, qemuCaps) < 0)
         goto error;
 
-    if (qemuBuildPMCommandLine(cmd, def, qemuCaps, monitor_json) < 0)
+    if (qemuBuildPMCommandLine(cmd, def, priv) < 0)
         goto error;
 
     if (qemuBuildBootCommandLine(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