aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2009-08-20 19:42:21 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2009-08-27 20:30:20 -0500
commitc8d41b2c2906f31181e9e5d479b76066a700a983 (patch)
treee5e258b12b0d5bfe5cab97f12ca15124aebe1b3e
parent7b63034926351c58643a7e365581f719c70d6e8c (diff)
move do_loadvm() to monitor.c
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r--monitor.c11
-rw-r--r--savevm.c11
-rw-r--r--sysemu.h1
3 files changed, 11 insertions, 12 deletions
diff --git a/monitor.c b/monitor.c
index 967171bcc6..57ce68b6d1 100644
--- a/monitor.c
+++ b/monitor.c
@@ -1721,6 +1721,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 95947a9495..f14487cad2 100644
--- a/savevm.c
+++ b/savevm.c
@@ -1239,17 +1239,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 b2fc92efcf..cabe79d36b 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);