mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
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:".
This commit is contained in:
parent
cf8de2442f
commit
b372983d14
@ -3170,19 +3170,11 @@ qemuMonitorJSONDump(qemuMonitorPtr mon,
|
|||||||
virJSONValuePtr cmd = NULL;
|
virJSONValuePtr cmd = NULL;
|
||||||
virJSONValuePtr reply = NULL;
|
virJSONValuePtr reply = NULL;
|
||||||
|
|
||||||
if (dumpformat) {
|
cmd = qemuMonitorJSONMakeCommand("dump-guest-memory",
|
||||||
cmd = qemuMonitorJSONMakeCommand("dump-guest-memory",
|
"b:paging", false,
|
||||||
"b:paging", false,
|
"s:protocol", protocol,
|
||||||
"s:protocol", protocol,
|
"S:format", dumpformat,
|
||||||
"s:format", dumpformat,
|
NULL);
|
||||||
NULL);
|
|
||||||
} else {
|
|
||||||
cmd = qemuMonitorJSONMakeCommand("dump-guest-memory",
|
|
||||||
"b:paging", false,
|
|
||||||
"s:protocol", protocol,
|
|
||||||
NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!cmd)
|
if (!cmd)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user