[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 01/15] hmp: Fix loadvm to resume the VM on success instead of fail
From: |
Dr. David Alan Gilbert (git) |
Subject: |
[PULL 01/15] hmp: Fix loadvm to resume the VM on success instead of failure |
Date: |
Wed, 26 May 2021 18:45:26 +0100 |
From: Kevin Wolf <kwolf@redhat.com>
Commit f61fe11aa6f broke 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: f61fe11aa6f7f8f0ffe4ddaa56a8108f3ab57854
Cc: 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>
---
monitor/hmp-cmds.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c
index d9bef63373..d10ee14110 100644
--- a/monitor/hmp-cmds.c
+++ b/monitor/hmp-cmds.c
@@ -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);
--
2.31.1
- [PULL 00/15] migration/virtiofs/hmp queue, Dr. David Alan Gilbert (git), 2021/05/26
- [PULL 02/15] virtiofsd: Check for EINTR in preadv() and retry, Dr. David Alan Gilbert (git), 2021/05/26
- [PULL 01/15] hmp: Fix loadvm to resume the VM on success instead of failure,
Dr. David Alan Gilbert (git) <=
- [PULL 03/15] virtiofsd: Get rid of unreachable code in read, Dr. David Alan Gilbert (git), 2021/05/26
- [PULL 05/15] virtiofsd: get rid of in_sg_left variable, Dr. David Alan Gilbert (git), 2021/05/26
- [PULL 04/15] virtiofsd: Use iov_discard_front() to skip bytes, Dr. David Alan Gilbert (git), 2021/05/26
- [PULL 06/15] virtiofsd: Simplify skip byte logic, Dr. David Alan Gilbert (git), 2021/05/26
- [PULL 08/15] virtiofsd: Set req->reply_sent right after sending reply, Dr. David Alan Gilbert (git), 2021/05/26
- [PULL 07/15] virtiofsd: Check EOF before short read, Dr. David Alan Gilbert (git), 2021/05/26
- [PULL 10/15] tools/virtiofsd/fuse_opt.c: Replaced a malloc with GLib's g_try_malloc, Dr. David Alan Gilbert (git), 2021/05/26
- [PULL 11/15] migration/rdma: Fix cm_event used before being initialized, Dr. David Alan Gilbert (git), 2021/05/26
- [PULL 14/15] migration/rdma: destination: create the return patch after the first accept, Dr. David Alan Gilbert (git), 2021/05/26
- [PULL 15/15] migration/rdma: source: poll cm_event from return path, Dr. David Alan Gilbert (git), 2021/05/26