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

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

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:

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

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 redhat com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

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