mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
hmp: Fix loadvm to resume the VM on success instead of failure
Commitf61fe11aa6broke hmp_loadvm() by adding an incorrect negation when converting from 0/-errno return values to a bool value. The result is that loadvm resumes the VM now if it failed and keeps it stopped if it failed. Fix it to restore the old behaviour and do it the other way around. Fixes:f61fe11aa6Cc: qemu-stable@nongnu.org Reported-by: Yanhui Ma <yama@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com> Message-Id: <20210511163151.45167-1-kwolf@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
This commit is contained in:
committed by
Dr. David Alan Gilbert
parent
0319ad22bd
commit
c53cd04e70
+1
-1
@@ -1133,7 +1133,7 @@ void hmp_loadvm(Monitor *mon, const QDict *qdict)
|
||||
|
||||
vm_stop(RUN_STATE_RESTORE_VM);
|
||||
|
||||
if (!load_snapshot(name, NULL, false, NULL, &err) && saved_vm_running) {
|
||||
if (load_snapshot(name, NULL, false, NULL, &err) && saved_vm_running) {
|
||||
vm_start();
|
||||
}
|
||||
hmp_handle_error(mon, err);
|
||||
|
||||
Reference in New Issue
Block a user