mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-31 14:23:53 -06:00
migration: never fail in global_state_store()
Actually global_state_store() can never fail. Let's get rid of extra error paths. To make things clear, use new runstate_get() and use same approach for global_state_store() and global_state_store_running(). Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Reviewed-by: Juan Quintela <quintela@redhat.com> Message-Id: <20230517123752.21615-3-vsementsov@yandex-team.ru> Signed-off-by: Juan Quintela <quintela@redhat.com>
This commit is contained in:
parent
242b74eb69
commit
c33f1829f8
4 changed files with 32 additions and 40 deletions
|
@ -2919,11 +2919,7 @@ bool save_snapshot(const char *name, bool overwrite, const char *vmstate,
|
|||
|
||||
saved_vm_running = runstate_is_running();
|
||||
|
||||
ret = global_state_store();
|
||||
if (ret) {
|
||||
error_setg(errp, "Error saving global state");
|
||||
return false;
|
||||
}
|
||||
global_state_store();
|
||||
vm_stop(RUN_STATE_SAVE_VM);
|
||||
|
||||
bdrv_drain_all_begin();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue