diff options
Diffstat (limited to 'migration')
-rw-r--r-- | migration/migration.c | 2 | ||||
-rw-r--r-- | migration/savevm.c | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/migration/migration.c b/migration/migration.c index ba82ff6bd1..86ca099ac4 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -110,7 +110,7 @@ typedef struct { static GlobalState global_state; -static int global_state_store(void) +int global_state_store(void) { if (!runstate_store((char *)global_state.runstate, sizeof(global_state.runstate))) { diff --git a/migration/savevm.c b/migration/savevm.c index 86735fc53a..81dbe5879f 100644 --- a/migration/savevm.c +++ b/migration/savevm.c @@ -1315,6 +1315,12 @@ void hmp_savevm(Monitor *mon, const QDict *qdict) } saved_vm_running = runstate_is_running(); + + ret = global_state_store(); + if (ret) { + monitor_printf(mon, "Error saving global state\n"); + return; + } vm_stop(RUN_STATE_SAVE_VM); memset(sn, 0, sizeof(*sn)); |