aboutsummaryrefslogtreecommitdiff
path: root/monitor.c
diff options
context:
space:
mode:
authorLuiz Capitulino <lcapitulino@redhat.com>2011-09-30 14:45:27 -0300
committerLuiz Capitulino <lcapitulino@redhat.com>2011-10-04 11:02:57 -0300
commit0461d5a699cb8825039400b76839115e35b73d65 (patch)
treeb206b04b7fe56eb1ea153d7c3866d070244f9e1b /monitor.c
parentc4d11e38bd475f33d5fa9ceba5292304727f3113 (diff)
RunState: Rename enum values as generated by the QAPI
Next commit will convert the query-status command to use the RunState type as generated by the QAPI. In order to "transparently" replace the current enum by the QAPI one, we have to make some changes to some enum values. As the changes are simple renames, I'll do them in one shot. The changes are: - Rename the prefix from RSTATE_ to RUN_STATE_ - RUN_STATE_SAVEVM to RUN_STATE_SAVE_VM - RUN_STATE_IN_MIGRATE to RUN_STATE_INMIGRATE - RUN_STATE_PANICKED to RUN_STATE_INTERNAL_ERROR - RUN_STATE_POST_MIGRATE to RUN_STATE_POSTMIGRATE - RUN_STATE_PRE_LAUNCH to RUN_STATE_PRELAUNCH - RUN_STATE_PRE_MIGRATE to RUN_STATE_PREMIGRATE - RUN_STATE_RESTORE to RUN_STATE_RESTORE_VM - RUN_STATE_PRE_MIGRATE to RUN_STATE_FINISH_MIGRATE Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'monitor.c')
-rw-r--r--monitor.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/monitor.c b/monitor.c
index dad4221c49..da729cec20 100644
--- a/monitor.c
+++ b/monitor.c
@@ -1248,7 +1248,7 @@ static void do_singlestep(Monitor *mon, const QDict *qdict)
*/
static int do_stop(Monitor *mon, const QDict *qdict, QObject **ret_data)
{
- vm_stop(RSTATE_PAUSED);
+ vm_stop(RUN_STATE_PAUSED);
return 0;
}
@@ -1266,11 +1266,11 @@ static int do_cont(Monitor *mon, const QDict *qdict, QObject **ret_data)
{
struct bdrv_iterate_context context = { mon, 0 };
- if (runstate_check(RSTATE_IN_MIGRATE)) {
+ if (runstate_check(RUN_STATE_INMIGRATE)) {
qerror_report(QERR_MIGRATION_EXPECTED);
return -1;
- } else if (runstate_check(RSTATE_PANICKED) ||
- runstate_check(RSTATE_SHUTDOWN)) {
+ } else if (runstate_check(RUN_STATE_INTERNAL_ERROR) ||
+ runstate_check(RUN_STATE_SHUTDOWN)) {
qerror_report(QERR_RESET_REQUIRED);
return -1;
}
@@ -2773,7 +2773,7 @@ static void do_loadvm(Monitor *mon, const QDict *qdict)
int saved_vm_running = runstate_is_running();
const char *name = qdict_get_str(qdict, "name");
- vm_stop(RSTATE_RESTORE);
+ vm_stop(RUN_STATE_RESTORE_VM);
if (load_vmstate(name) == 0 && saved_vm_running) {
vm_start();