From: Eric Blake Date: Mon, 10 Oct 2011 20:20:38 +0000 (-0600) Subject: snapshot: use correct qmp monitor command X-Git-Tag: v0.9.7-rc1~141 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=59f179ce646698354fde59f12331d56a94d5164d;p=thirdparty%2Flibvirt.git 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. --- diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index 3d383c825e..18d1c9f51d 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -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; }