提交 755a09b5 编写于 作者: T tangchen 提交者: Eric Blake

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: Ntangchen <tangchen@cn.fujitsu.com>
上级 10d3272e
...@@ -4511,6 +4511,7 @@ static char *qemuDomainXMLToNative(virConnectPtr conn, ...@@ -4511,6 +4511,7 @@ static char *qemuDomainXMLToNative(virConnectPtr conn,
virDomainDefPtr def = NULL; virDomainDefPtr def = NULL;
virDomainChrSourceDef monConfig; virDomainChrSourceDef monConfig;
virBitmapPtr qemuCaps = NULL; virBitmapPtr qemuCaps = NULL;
bool monitor_json = false;
virCommandPtr cmd = NULL; virCommandPtr cmd = NULL;
char *ret = NULL; char *ret = NULL;
int i; int i;
...@@ -4608,11 +4609,13 @@ static char *qemuDomainXMLToNative(virConnectPtr conn, ...@@ -4608,11 +4609,13 @@ static char *qemuDomainXMLToNative(virConnectPtr conn,
&qemuCaps) < 0) &qemuCaps) < 0)
goto cleanup; goto cleanup;
monitor_json = qemuCapsGet(qemuCaps, QEMU_CAPS_MONITOR_JSON);
if (qemuProcessPrepareMonitorChr(driver, &monConfig, def->name) < 0) if (qemuProcessPrepareMonitorChr(driver, &monConfig, def->name) < 0)
goto cleanup; goto cleanup;
if (!(cmd = qemuBuildCommandLine(conn, driver, def, if (!(cmd = qemuBuildCommandLine(conn, driver, def,
&monConfig, false, qemuCaps, &monConfig, monitor_json, qemuCaps,
NULL, -1, NULL, VIR_VM_OP_NO_OP))) NULL, -1, NULL, VIR_VM_OP_NO_OP)))
goto cleanup; goto cleanup;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册