Signed-off-by: Benoit Canet <ben...@irqsave.net> --- monitor-system.c | 12 ++++++++++++ monitor.c | 12 ------------ 2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/monitor-system.c b/monitor-system.c index 2d49c76..9e9a4ac 100644 --- a/monitor-system.c +++ b/monitor-system.c @@ -1399,3 +1399,15 @@ void do_inject_mce(Monitor *mon, const QDict *qdict) } } #endif + +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(RUN_STATE_RESTORE_VM); + + if (load_vmstate(name) == 0 && saved_vm_running) { + vm_start(); + } +} diff --git a/monitor.c b/monitor.c index 9aeafd3..d2e56f8 100644 --- a/monitor.c +++ b/monitor.c @@ -826,18 +826,6 @@ void qmp_closefd(const char *fdname, Error **errp) error_set(errp, QERR_FD_NOT_FOUND, fdname); } -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(RUN_STATE_RESTORE_VM); - - if (load_vmstate(name) == 0 && saved_vm_running) { - vm_start(); - } -} - int monitor_get_fd(Monitor *mon, const char *fdname, Error **errp) { mon_fd_t *monfd; -- 2.0.1