[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 05/10] monitor: Move hmp_loadvm from monitor.c to hmp
From: |
Juan Quintela |
Subject: |
[Qemu-devel] [PULL 05/10] monitor: Move hmp_loadvm from monitor.c to hmp.c |
Date: |
Thu, 4 May 2017 11:40:48 +0200 |
We are going to move the rest of hmp snapshots functions there instead
of monitor.c.
Signed-off-by: Juan Quintela <address@hidden>
Reviewed-by: Laurent Vivier <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>
---
hmp.c | 13 +++++++++++++
hmp.h | 1 +
monitor.c | 13 -------------
3 files changed, 14 insertions(+), 13 deletions(-)
diff --git a/hmp.c b/hmp.c
index ab407d6..f6b8738 100644
--- a/hmp.c
+++ b/hmp.c
@@ -19,6 +19,7 @@
#include "net/eth.h"
#include "sysemu/char.h"
#include "sysemu/block-backend.h"
+#include "sysemu/sysemu.h"
#include "qemu/config-file.h"
#include "qemu/option.h"
#include "qemu/timer.h"
@@ -1268,6 +1269,18 @@ void hmp_snapshot_delete_blkdev_internal(Monitor *mon,
const QDict *qdict)
hmp_handle_error(mon, &err);
}
+void hmp_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();
+ }
+}
+
void hmp_migrate_cancel(Monitor *mon, const QDict *qdict)
{
qmp_migrate_cancel(NULL);
diff --git a/hmp.h b/hmp.h
index 799fd37..385332c 100644
--- a/hmp.h
+++ b/hmp.h
@@ -63,6 +63,7 @@ void hmp_snapshot_blkdev_internal(Monitor *mon, const QDict
*qdict);
void hmp_snapshot_delete_blkdev_internal(Monitor *mon, const QDict *qdict);
void hmp_drive_mirror(Monitor *mon, const QDict *qdict);
void hmp_drive_backup(Monitor *mon, const QDict *qdict);
+void hmp_loadvm(Monitor *mon, const QDict *qdict);
void hmp_migrate_cancel(Monitor *mon, const QDict *qdict);
void hmp_migrate_incoming(Monitor *mon, const QDict *qdict);
void hmp_migrate_set_downtime(Monitor *mon, const QDict *qdict);
diff --git a/monitor.c b/monitor.c
index 62c9f81..ce11029 100644
--- a/monitor.c
+++ b/monitor.c
@@ -37,7 +37,6 @@
#include "net/slirp.h"
#include "sysemu/char.h"
#include "ui/qemu-spice.h"
-#include "sysemu/sysemu.h"
#include "sysemu/numa.h"
#include "monitor/monitor.h"
#include "qemu/config-file.h"
@@ -1954,18 +1953,6 @@ void qmp_closefd(const char *fdname, Error **errp)
error_setg(errp, QERR_FD_NOT_FOUND, fdname);
}
-static void hmp_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.9.3
- [Qemu-devel] [PULL 00/10] Migration PULL requset, Juan Quintela, 2017/05/04
- [Qemu-devel] [PULL 02/10] migration: setup bi-directional I/O channel for exec: protocol, Juan Quintela, 2017/05/04
- [Qemu-devel] [PULL 03/10] migration: to_dst_file at that point is NULL, Juan Quintela, 2017/05/04
- [Qemu-devel] [PULL 01/10] ram: Split dirty bitmap by RAMBlock, Juan Quintela, 2017/05/04
- [Qemu-devel] [PULL 04/10] monitor: Remove monitor parameter from save_vmstate, Juan Quintela, 2017/05/04
- [Qemu-devel] [PULL 05/10] monitor: Move hmp_loadvm from monitor.c to hmp.c,
Juan Quintela <=
- [Qemu-devel] [PULL 07/10] monitor: Move hmp_delvm from savevm.c to hmp.c, Juan Quintela, 2017/05/04
- [Qemu-devel] [PULL 06/10] monitor: Move hmp_savevm from savevm.c to hmp.c, Juan Quintela, 2017/05/04
- [Qemu-devel] [PULL 08/10] monitor: Move hmp_info_snapshots from savevm.c to hmp.c, Juan Quintela, 2017/05/04
- [Qemu-devel] [PULL 10/10] migration: Extra tracing, Juan Quintela, 2017/05/04
- [Qemu-devel] [PULL 09/10] migration: Move postcopy-ram.h to migration/, Juan Quintela, 2017/05/04
- Re: [Qemu-devel] [PULL 00/10] Migration PULL requset, Stefan Hajnoczi, 2017/05/05