[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 18/32] migration: Move the QMP command from monitor/ to migration
From: |
Markus Armbruster |
Subject: |
[PATCH 18/32] migration: Move the QMP command from monitor/ to migration/ |
Date: |
Tue, 24 Jan 2023 13:19:32 +0100 |
This moves the command from MAINTAINERS sections "Human Monitor (HMP)"
and "QMP" to "Migration".
Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
migration/migration.c | 30 ++++++++++++++++++++++++++++++
monitor/misc.c | 31 -------------------------------
2 files changed, 30 insertions(+), 31 deletions(-)
diff --git a/migration/migration.c b/migration/migration.c
index 52b5d39244..56859d5869 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -61,6 +61,7 @@
#include "sysemu/cpus.h"
#include "yank_functions.h"
#include "sysemu/qtest.h"
+#include "ui/qemu-spice.h"
#define MAX_THROTTLE (128 << 20) /* Migration transfer speed throttling
*/
@@ -963,6 +964,35 @@ MigrationParameters *qmp_query_migrate_parameters(Error
**errp)
return params;
}
+void qmp_client_migrate_info(const char *protocol, const char *hostname,
+ bool has_port, int64_t port,
+ bool has_tls_port, int64_t tls_port,
+ const char *cert_subject,
+ Error **errp)
+{
+ if (strcmp(protocol, "spice") == 0) {
+ if (!qemu_using_spice(errp)) {
+ return;
+ }
+
+ if (!has_port && !has_tls_port) {
+ error_setg(errp, QERR_MISSING_PARAMETER, "port/tls-port");
+ return;
+ }
+
+ if (qemu_spice.migrate_info(hostname,
+ has_port ? port : -1,
+ has_tls_port ? tls_port : -1,
+ cert_subject)) {
+ error_setg(errp, "Could not set up display for migration");
+ return;
+ }
+ return;
+ }
+
+ error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "protocol", "'spice'");
+}
+
AnnounceParameters *migrate_announce_params(void)
{
static AnnounceParameters ap;
diff --git a/monitor/misc.c b/monitor/misc.c
index 780f2a6b04..ff3002a880 100644
--- a/monitor/misc.c
+++ b/monitor/misc.c
@@ -27,7 +27,6 @@
#include "monitor/qdev.h"
#include "exec/gdbstub.h"
#include "net/slirp.h"
-#include "ui/qemu-spice.h"
#include "qemu/ctype.h"
#include "disas/disas.h"
#include "qemu/log.h"
@@ -43,7 +42,6 @@
#include "exec/ioport.h"
#include "block/block-hmp-cmds.h"
#include "qapi/qapi-commands-control.h"
-#include "qapi/qapi-commands-migration.h"
#include "qapi/qapi-commands-misc.h"
#include "qapi/qapi-commands-run-state.h"
#include "qapi/qapi-commands-machine.h"
@@ -291,35 +289,6 @@ static void hmp_info_history(Monitor *mon, const QDict
*qdict)
}
}
-void qmp_client_migrate_info(const char *protocol, const char *hostname,
- bool has_port, int64_t port,
- bool has_tls_port, int64_t tls_port,
- const char *cert_subject,
- Error **errp)
-{
- if (strcmp(protocol, "spice") == 0) {
- if (!qemu_using_spice(errp)) {
- return;
- }
-
- if (!has_port && !has_tls_port) {
- error_setg(errp, QERR_MISSING_PARAMETER, "port/tls-port");
- return;
- }
-
- if (qemu_spice.migrate_info(hostname,
- has_port ? port : -1,
- has_tls_port ? tls_port : -1,
- cert_subject)) {
- error_setg(errp, "Could not set up display for migration");
- return;
- }
- return;
- }
-
- error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "protocol", "'spice'");
-}
-
static void hmp_logfile(Monitor *mon, const QDict *qdict)
{
Error *err = NULL;
--
2.39.0
- [PATCH 20/32] tpm: Move HMP commands from monitor/ to softmmu/, (continued)
- [PATCH 20/32] tpm: Move HMP commands from monitor/ to softmmu/, Markus Armbruster, 2023/01/24
- [PATCH 28/32] monitor: Move target-dependent HMP commands to hmp-cmds-target.c, Markus Armbruster, 2023/01/24
- [PATCH 19/32] virtio: Move HMP commands from monitor/ to hw/virtio/, Markus Armbruster, 2023/01/24
- [PATCH 13/32] rocker: Move HMP commands from monitor to hw/net/rocker/, Markus Armbruster, 2023/01/24
- [PATCH 21/32] runstate: Move HMP commands from monitor/ to softmmu/, Markus Armbruster, 2023/01/24
- [PATCH 23/32] stats: Move HMP commands from monitor/ to stats/, Markus Armbruster, 2023/01/24
- [PATCH 27/32] monitor: Move monitor_putc() next to monitor_puts & external linkage, Markus Armbruster, 2023/01/24
- [PATCH 30/32] monitor: Move remaining QMP stuff from misc.c to qmp-cmds.c, Markus Armbruster, 2023/01/24
- [PATCH 18/32] migration: Move the QMP command from monitor/ to migration/,
Markus Armbruster <=
- [PATCH 32/32] monitor: Rename misc.c to hmp-target.c, Markus Armbruster, 2023/01/24
- [PATCH 29/32] monitor: Move remaining HMP commands from misc.c to hmp-cmds.c, Markus Armbruster, 2023/01/24
- [PATCH 15/32] net: Move HMP commands from monitor to net/, Markus Armbruster, 2023/01/24
- [PATCH 04/32] char: Factor out qmp_add_client() parts and move to chardev/, Markus Armbruster, 2023/01/24
- [PATCH 31/32] monitor: Loosen coupling between misc.c and monitor.c slightly, Markus Armbruster, 2023/01/24
- [PATCH 22/32] stats: Move QMP commands from monitor/ to stats/, Markus Armbruster, 2023/01/24
- [PATCH 12/32] block: Factor out hmp_change_medium(), and move to block/monitor/, Markus Armbruster, 2023/01/24
- [PATCH 25/32] qdev: Move HMP command completion from monitor to softmmu/, Markus Armbruster, 2023/01/24