qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH v1 13/24] monitor: Move do_loadvm from monitor.c to


From: Benoît Canet
Subject: [Qemu-devel] [PATCH v1 13/24] monitor: Move do_loadvm from monitor.c to monitor-system.c
Date: Fri, 1 Aug 2014 07:27:11 +0200

Signed-off-by: Benoit 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 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




reply via email to

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