提交 b372983d 编写于 作者: J John Ferlan

qemu: Alter dump-guest-memory command generation

The qemuMonitorJSONMakeCommand can properly handle a NULL string
by using the "S:" parameter instead of "s:", so let's use that
of having in if/else condition that only adds the "s:".
上级 cf8de244
......@@ -3170,19 +3170,11 @@ qemuMonitorJSONDump(qemuMonitorPtr mon,
virJSONValuePtr cmd = NULL;
virJSONValuePtr reply = NULL;
if (dumpformat) {
cmd = qemuMonitorJSONMakeCommand("dump-guest-memory",
"b:paging", false,
"s:protocol", protocol,
"s:format", dumpformat,
NULL);
} else {
cmd = qemuMonitorJSONMakeCommand("dump-guest-memory",
"b:paging", false,
"s:protocol", protocol,
NULL);
}
cmd = qemuMonitorJSONMakeCommand("dump-guest-memory",
"b:paging", false,
"s:protocol", protocol,
"S:format", dumpformat,
NULL);
if (!cmd)
return -1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册