diff mbox

[v2,15/26] monitor: Move do_loadvm from monitor.c to monitor-system.c

Message ID 1408109759-1100-16-git-send-email-benoit.canet@nodalink.com
State New
Headers show

Commit Message

Benoît Canet Aug. 15, 2014, 1:35 p.m. UTC
Signed-off-by: Benoît Canet <benoit.canet@nodalink.com>
---
 monitor-system.c | 12 ++++++++++++
 monitor.c        | 12 ------------
 2 files changed, 12 insertions(+), 12 deletions(-)
diff mbox

Patch

diff --git a/monitor-system.c b/monitor-system.c
index a87203c..b6f33a7 100644
--- a/monitor-system.c
+++ b/monitor-system.c
@@ -1400,3 +1400,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 be63688..5017ecf 100644
--- a/monitor.c
+++ b/monitor.c
@@ -827,18 +827,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;