diff options
author | Markus Armbruster <armbru@redhat.com> | 2023-01-24 13:19:31 +0100 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2023-02-04 07:56:54 +0100 |
commit | 119f50ce30f1dfdfd33e4ec7455b147834c794d5 (patch) | |
tree | dc20809f70fc1047d8bc1df7826e63c34cdf3f06 /monitor/misc.c | |
parent | ae71d13d4e606cc89f361ce813e85fb6f6e92096 (diff) |
migration: Move HMP commands from monitor/ to migration/
This moves these commands from MAINTAINERS sections "Human
Monitor (HMP)" and "QMP" to "Migration".
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20230124121946.1139465-18-armbru@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'monitor/misc.c')
-rw-r--r-- | monitor/misc.c | 82 |
1 files changed, 0 insertions, 82 deletions
diff --git a/monitor/misc.c b/monitor/misc.c index 77a76b2b5f..780f2a6b04 100644 --- a/monitor/misc.c +++ b/monitor/misc.c @@ -41,7 +41,6 @@ #include "monitor/hmp.h" #include "exec/address-spaces.h" #include "exec/ioport.h" -#include "block/qapi.h" #include "block/block-hmp-cmds.h" #include "qapi/qapi-commands-control.h" #include "qapi/qapi-commands-migration.h" @@ -1362,87 +1361,6 @@ void watchdog_action_completion(ReadLineState *rs, int nb_args, const char *str) } } -void migrate_set_capability_completion(ReadLineState *rs, int nb_args, - const char *str) -{ - size_t len; - - len = strlen(str); - readline_set_completion_index(rs, len); - if (nb_args == 2) { - int i; - for (i = 0; i < MIGRATION_CAPABILITY__MAX; i++) { - readline_add_completion_of(rs, str, MigrationCapability_str(i)); - } - } else if (nb_args == 3) { - readline_add_completion_of(rs, str, "on"); - readline_add_completion_of(rs, str, "off"); - } -} - -void migrate_set_parameter_completion(ReadLineState *rs, int nb_args, - const char *str) -{ - size_t len; - - len = strlen(str); - readline_set_completion_index(rs, len); - if (nb_args == 2) { - int i; - for (i = 0; i < MIGRATION_PARAMETER__MAX; i++) { - readline_add_completion_of(rs, str, MigrationParameter_str(i)); - } - } -} - -static void vm_completion(ReadLineState *rs, const char *str) -{ - size_t len; - BlockDriverState *bs; - BdrvNextIterator it; - - len = strlen(str); - readline_set_completion_index(rs, len); - - for (bs = bdrv_first(&it); bs; bs = bdrv_next(&it)) { - SnapshotInfoList *snapshots, *snapshot; - AioContext *ctx = bdrv_get_aio_context(bs); - bool ok = false; - - aio_context_acquire(ctx); - if (bdrv_can_snapshot(bs)) { - ok = bdrv_query_snapshot_info_list(bs, &snapshots, NULL) == 0; - } - aio_context_release(ctx); - if (!ok) { - continue; - } - - snapshot = snapshots; - while (snapshot) { - readline_add_completion_of(rs, str, snapshot->value->name); - readline_add_completion_of(rs, str, snapshot->value->id); - snapshot = snapshot->next; - } - qapi_free_SnapshotInfoList(snapshots); - } - -} - -void delvm_completion(ReadLineState *rs, int nb_args, const char *str) -{ - if (nb_args == 2) { - vm_completion(rs, str); - } -} - -void loadvm_completion(ReadLineState *rs, int nb_args, const char *str) -{ - if (nb_args == 2) { - vm_completion(rs, str); - } -} - static int compare_mon_cmd(const void *a, const void *b) { |