Re: [PATCH] The output of domxml-to-native should be the same as the actual commandline.

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

 



That's a long subject; do 'git shortlog -30' to get a feel for the average commit message length. I shortened it to:

qemu: allow json in domxml-to-native

On 10/20/2011 04:37 AM, tangchen wrote:
Hi,

There is a little difference between the output of domxml-to-native and the actual commandline.
No matter qemu is in control or readline mode, domxml-to-native always converts it to readline mode.

That is because the parameter "monitor_json" for qemuBuildCommandLine() is always set to false
in qemuDomainXMLToNative().

Here is the patch, please comment!



+#ifdef HAVE_YAJL
+    monitor_json = qemuCapsGet(qemuCaps, QEMU_CAPS_MONITOR_JSON);
+#endif

The #ifdef is spurious here. It is useful for situations like calling qemuMonitorSystemPowerdown, where we know the command will fail without json support, but not for the simple querying of a capability bit.

For that matter, I'll go ahead and remove the other uses of HAVE_YAJL from this file, as a followup patch.

+
      if (qemuProcessPrepareMonitorChr(driver,&monConfig, def->name)<  0)
          goto cleanup;

      if (!(cmd = qemuBuildCommandLine(conn, driver, def,
-&monConfig, false, qemuCaps,
+&monConfig, monitor_json, qemuCaps,
                                       NULL, -1, NULL, VIR_VM_OP_NO_OP)))
          goto cleanup;

ACK and pushed.

--
Eric Blake   eblake@xxxxxxxxxx    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

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