Patchwork [03/23] move do_loadvm() to monitor.c

login
register
mail settings
Submitter Juan Quintela
Date Aug. 20, 2009, 5:42 p.m.
Message ID <bec3e8940c6c00c9eb780e85d0b5d96a5cecb7ee.1250788880.git.quintela@redhat.com>
Download mbox | patch
Permalink /patch/31752/
State Superseded
Headers show

Comments

Juan Quintela - Aug. 20, 2009, 5:42 p.m.
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 monitor.c |   11 +++++++++++
 savevm.c  |   11 -----------
 sysemu.h  |    1 -
 3 files changed, 11 insertions(+), 12 deletions(-)

Patch

diff --git a/monitor.c b/monitor.c
index 362322b..b8a47ca 100644
--- a/monitor.c
+++ b/monitor.c
@@ -1776,6 +1776,17 @@  static void do_closefd(Monitor *mon, const char *fdname)
                    fdname);
 }

+static void do_loadvm(Monitor *mon, const char *name)
+{
+    int saved_vm_running  = vm_running;
+
+    vm_stop(0);
+
+    load_vmstate(mon, name);
+    if (saved_vm_running)
+        vm_start();
+}
+
 int monitor_get_fd(Monitor *mon, const char *fdname)
 {
     mon_fd_t *monfd;
diff --git a/savevm.c b/savevm.c
index a321136..d0ed2ad 100644
--- a/savevm.c
+++ b/savevm.c
@@ -1210,17 +1210,6 @@  void load_vmstate(Monitor *mon, const char *name)
     }
 }

-void do_loadvm(Monitor *mon, const char *name)
-{
-    int saved_vm_running  = vm_running;
-
-    vm_stop(0);
-
-    load_vmstate(mon, name);
-    if (saved_vm_running)
-        vm_start();
-}
-
 void do_delvm(Monitor *mon, const char *name)
 {
     DriveInfo *dinfo;
diff --git a/sysemu.h b/sysemu.h
index a20025d..330386c 100644
--- a/sysemu.h
+++ b/sysemu.h
@@ -51,7 +51,6 @@  extern qemu_irq qemu_system_powerdown;
 void qemu_system_reset(void);

 void do_savevm(Monitor *mon, const char *name);
-void do_loadvm(Monitor *mon, const char *name);
 void load_vmstate(Monitor *mon, const char *name);
 void do_delvm(Monitor *mon, const char *name);
 void do_info_snapshots(Monitor *mon);