aboutsummaryrefslogtreecommitdiffstats
path: root/savevm.c
diff options
context:
space:
mode:
authorVladimir Chtchetkine <vchtchetkine@google.com>2012-02-03 10:02:50 -0800
committerVladimir Chtchetkine <vchtchetkine@google.com>2012-02-03 10:02:50 -0800
commit05e074899c900b99adca7b37eee19a4ddc090e38 (patch)
tree62e39df9f077bf182ae8b8939b596a9bf16c2816 /savevm.c
parent9d5d34571cb8f596e6ed215e5778c94b8207a33b (diff)
downloadexternal_qemu-05e074899c900b99adca7b37eee19a4ddc090e38.zip
external_qemu-05e074899c900b99adca7b37eee19a4ddc090e38.tar.gz
external_qemu-05e074899c900b99adca7b37eee19a4ddc090e38.tar.bz2
Fix an issue with loading multiple snapshots.
This is a fix for a user reported issue #15922:Using multiple (named) snapshots does not work. Change-Id: I71989a99d182f9d84c6ee08414d35e2154ca4357
Diffstat (limited to 'savevm.c')
-rw-r--r--savevm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/savevm.c b/savevm.c
index 7a5dc23..c2602b4 100644
--- a/savevm.c
+++ b/savevm.c
@@ -1362,8 +1362,8 @@ void do_loadvm(Monitor *err, const char *name)
saved_vm_running = vm_running;
vm_stop(0);
- bs1 = NULL;
- while ((bs1 = bdrv_next(bs))) {
+ bs1 = bs;
+ do {
if (bdrv_can_snapshot(bs1)) {
ret = bdrv_snapshot_goto(bs1, name);
if (ret < 0) {
@@ -1390,7 +1390,7 @@ void do_loadvm(Monitor *err, const char *name)
goto the_end;
}
}
- }
+ } while ((bs1 = bdrv_next(bs)));
if (bdrv_get_info(bs, bdi) < 0 || bdi->vm_state_offset <= 0) {
monitor_printf(err, "Device %s does not support VM state snapshots\n",