]> git.ipfire.org Git - thirdparty/qemu.git/commit
hmp: Fix loadvm to resume the VM on success instead of failure
authorKevin Wolf <kwolf@redhat.com>
Tue, 11 May 2021 16:31:51 +0000 (18:31 +0200)
committerMichael Roth <michael.roth@amd.com>
Thu, 14 Oct 2021 20:42:34 +0000 (15:42 -0500)
commitfcfe1509a1a622d85224a1e7003aba940897fe8d
treea0550f858b24947da2c40434f2fe06f375047546
parent9b0ee423a1b5312f12e375eaacb6fcdd56e60d16
hmp: Fix loadvm to resume the VM on success instead of failure

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>
(cherry picked from commit c53cd04e70641fdf9410aac40c617d074047b3e1)
Signed-off-by: Michael Roth <michael.roth@amd.com>
monitor/hmp-cmds.c