qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH v2 15/26] monitor: Move do_loadvm from monitor.c to


From: Benoît Canet
Subject: [Qemu-devel] [PATCH v2 15/26] monitor: Move do_loadvm from monitor.c to monitor-system.c
Date: Fri, 15 Aug 2014 15:35:47 +0200

Signed-off-by: Benoît Canet <address@hidden>
---
 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 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;
-- 
2.1.0.rc1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]