提交 59f179ce 编写于 作者: E Eric Blake

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 e702b5ba 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.
上级 b77b203c
......@@ -2960,7 +2960,7 @@ qemuMonitorJSONDiskSnapshot(qemuMonitorPtr mon, const char *device,
virJSONValuePtr cmd;
virJSONValuePtr reply = NULL;
cmd = qemuMonitorJSONMakeCommand("snapshot-blkdev-sync",
cmd = qemuMonitorJSONMakeCommand("blockdev-snapshot-sync",
"s:device", device,
"s:snapshot-file", file,
NULL);
......@@ -2972,7 +2972,7 @@ qemuMonitorJSONDiskSnapshot(qemuMonitorPtr mon, const char *device,
if (qemuMonitorJSONHasError(reply, "CommandNotFound") &&
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);
goto cleanup;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册