Message ID | 1271797792-24571-6-git-send-email-lcapitulino@redhat.com |
---|---|
State | New |
Headers | show |
diff --git a/savevm.c b/savevm.c index cc6cbb2..5024829 100644 --- a/savevm.c +++ b/savevm.c @@ -1793,7 +1793,7 @@ int load_vmstate(const char *name) } /* fatal on snapshot block device */ if (bs == bs1) - return 0; + return ret; } } }
When looping to restore the snapshot on all drives, load_vmstate() will return 0 if bdrv_snapshot_goto() returns an error. This seems a trick to avoid the call to vm_start() in do_loadvm(), however it brings two problems: 1. The call to load_vmstate() from main() will succeed 2. In QMP, it's just not allowed to fail and return 0 This commit fixes that. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> --- savevm.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)