Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
runstate: add runstate_get()
It's necessary to restore the state after failed/cancelled migration in
further commit.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Message-Id: <20230517123752.21615-2-vsementsov@yandex-team.ru>
Signed-off-by: Juan Quintela <quintela@redhat.com>
  • Loading branch information
Vladimir Sementsov-Ogievskiy authored and Juan Quintela committed May 30, 2023
1 parent aa9bbd8 commit eb2ca51
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/sysemu/runstate.h
Expand Up @@ -6,6 +6,7 @@

bool runstate_check(RunState state);
void runstate_set(RunState new_state);
RunState runstate_get(void);
bool runstate_is_running(void);
bool runstate_needs_reset(void);
bool runstate_store(char *str, size_t size);
Expand Down
5 changes: 5 additions & 0 deletions softmmu/runstate.c
Expand Up @@ -221,6 +221,11 @@ void runstate_set(RunState new_state)
current_run_state = new_state;
}

RunState runstate_get(void)
{
return current_run_state;
}

bool runstate_is_running(void)
{
return runstate_check(RUN_STATE_RUNNING);
Expand Down

0 comments on commit eb2ca51

Please sign in to comment.