From 755a09b579a5d27d4d39233652b597e0aa23166e Mon Sep 17 00:00:00 2001 From: tangchen Date: Thu, 20 Oct 2011 18:37:52 +0800 Subject: [PATCH] qemu: allow json in domxml-to-native 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(). Signed-off-by: tangchen --- src/qemu/qemu_driver.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 84ef4dd078..0a0a34ac7b 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -4511,6 +4511,7 @@ static char *qemuDomainXMLToNative(virConnectPtr conn, virDomainDefPtr def = NULL; virDomainChrSourceDef monConfig; virBitmapPtr qemuCaps = NULL; + bool monitor_json = false; virCommandPtr cmd = NULL; char *ret = NULL; int i; @@ -4608,11 +4609,13 @@ static char *qemuDomainXMLToNative(virConnectPtr conn, &qemuCaps) < 0) goto cleanup; + monitor_json = qemuCapsGet(qemuCaps, QEMU_CAPS_MONITOR_JSON); + 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; -- GitLab