diff options
Diffstat (limited to 'migration/global_state.c')
-rw-r--r-- | migration/global_state.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/migration/global_state.c b/migration/global_state.c index dcbbcb28be..dfdaf63910 100644 --- a/migration/global_state.c +++ b/migration/global_state.c @@ -14,7 +14,6 @@ #include "qemu/cutils.h" #include "qemu/error-report.h" #include "qapi/error.h" -#include "qapi/util.h" #include "migration.h" #include "migration/global_state.h" #include "migration/vmstate.h" @@ -42,7 +41,7 @@ int global_state_store(void) void global_state_store_running(void) { - const char *state = RunState_lookup[RUN_STATE_RUNNING]; + const char *state = RunState_str(RUN_STATE_RUNNING); strncpy((char *)global_state.runstate, state, sizeof(global_state.runstate)); } @@ -89,8 +88,7 @@ static int global_state_post_load(void *opaque, int version_id) s->received = true; trace_migrate_global_state_post_load(runstate); - r = qapi_enum_parse(RunState_lookup, runstate, RUN_STATE__MAX, - -1, &local_err); + r = qapi_enum_parse(&RunState_lookup, runstate, -1, &local_err); if (r == -1) { if (local_err) { |