mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 15:27:47 +00:00
snapshot: use correct qmp monitor command
To date, JSON disk snapshots worked by accident, as they were always
using hmp fallback due to a typo in commit e702b5b
not picking up
on the (intentional) difference in command names between the two
monitor protocols.
* src/qemu/qemu_monitor_json.c (qemuMonitorJSONDiskSnapshot):
Spell QMP command correctly.
Reported by Luiz Capitulino.
This commit is contained in:
parent
b77b203cac
commit
59f179ce64
@ -2960,7 +2960,7 @@ qemuMonitorJSONDiskSnapshot(qemuMonitorPtr mon, const char *device,
|
|||||||
virJSONValuePtr cmd;
|
virJSONValuePtr cmd;
|
||||||
virJSONValuePtr reply = NULL;
|
virJSONValuePtr reply = NULL;
|
||||||
|
|
||||||
cmd = qemuMonitorJSONMakeCommand("snapshot-blkdev-sync",
|
cmd = qemuMonitorJSONMakeCommand("blockdev-snapshot-sync",
|
||||||
"s:device", device,
|
"s:device", device,
|
||||||
"s:snapshot-file", file,
|
"s:snapshot-file", file,
|
||||||
NULL);
|
NULL);
|
||||||
@ -2972,7 +2972,7 @@ qemuMonitorJSONDiskSnapshot(qemuMonitorPtr mon, const char *device,
|
|||||||
|
|
||||||
if (qemuMonitorJSONHasError(reply, "CommandNotFound") &&
|
if (qemuMonitorJSONHasError(reply, "CommandNotFound") &&
|
||||||
qemuMonitorCheckHMP(mon, "snapshot_blkdev")) {
|
qemuMonitorCheckHMP(mon, "snapshot_blkdev")) {
|
||||||
VIR_DEBUG("snapshot-blkdev-sync command not found, trying HMP");
|
VIR_DEBUG("blockdev-snapshot-sync command not found, trying HMP");
|
||||||
ret = qemuMonitorTextDiskSnapshot(mon, device, file);
|
ret = qemuMonitorTextDiskSnapshot(mon, device, file);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user