mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
migration: stop returning errno from load_snapshot()
None of the callers care about the errno value since there is a full Error object populated. This gives consistency with save_snapshot() which already just returns a boolean value. Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> [PMD: Return false/true instead of -1/0, document function] Acked-by: Pavel Dovgalyuk <pavel.dovgalyuk@ispras.ru> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20210204124834.774401-4-berrange@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
This commit is contained in:
parent
7ea14df230
commit
f61fe11aa6
5 changed files with 21 additions and 14 deletions
|
@ -1139,7 +1139,7 @@ void hmp_loadvm(Monitor *mon, const QDict *qdict)
|
|||
|
||||
vm_stop(RUN_STATE_RESTORE_VM);
|
||||
|
||||
if (load_snapshot(name, &err) == 0 && saved_vm_running) {
|
||||
if (!load_snapshot(name, &err) && saved_vm_running) {
|
||||
vm_start();
|
||||
}
|
||||
hmp_handle_error(mon, err);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue