]> xenbits.xensource.com Git - libvirt.git/commitdiff
snapshot: use correct qmp monitor command
authorEric Blake <eblake@redhat.com>
Mon, 10 Oct 2011 20:20:38 +0000 (14:20 -0600)
committerEric Blake <eblake@redhat.com>
Tue, 11 Oct 2011 22:54:03 +0000 (16:54 -0600)
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.

src/qemu/qemu_monitor_json.c

index 3d383c825e80c677cef52ada8e47bc2f7d2638ff..18d1c9f51d731218c87f10b41885fbb4992cb957 100644 (file)
@@ -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;
     }