diff options
author | Markus Armbruster <armbru@redhat.com> | 2023-01-24 13:19:17 +0100 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2023-02-04 07:56:54 +0100 |
commit | b7d75c0b4816b2d766671f1e5a64de1251526686 (patch) | |
tree | 81851f306982ba398e31d2592454621dac02489d /monitor/misc.c | |
parent | 98b5362bdd53188d0bf1754267f49580cde9dde1 (diff) |
char: Move HMP commands from monitor/ to chardev/
This moves these commands from MAINTAINERS sections "Human
Monitor (HMP)" and "QMP" to "Character device backends".
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20230124121946.1139465-4-armbru@redhat.com>
Diffstat (limited to 'monitor/misc.c')
-rw-r--r-- | monitor/misc.c | 78 |
1 files changed, 0 insertions, 78 deletions
diff --git a/monitor/misc.c b/monitor/misc.c index 80d5527774..c18a713d9c 100644 --- a/monitor/misc.c +++ b/monitor/misc.c @@ -49,7 +49,6 @@ #include "exec/ioport.h" #include "block/qapi.h" #include "block/block-hmp-cmds.h" -#include "qapi/qapi-commands-char.h" #include "qapi/qapi-commands-control.h" #include "qapi/qapi-commands-migration.h" #include "qapi/qapi-commands-misc.h" @@ -1362,29 +1361,6 @@ static void add_completion_option(ReadLineState *rs, const char *str, } } -void chardev_add_completion(ReadLineState *rs, int nb_args, const char *str) -{ - size_t len; - ChardevBackendInfoList *list, *start; - - if (nb_args != 2) { - return; - } - len = strlen(str); - readline_set_completion_index(rs, len); - - start = list = qmp_query_chardev_backends(NULL); - while (list) { - const char *chr_name = list->value->name; - - if (!strncmp(chr_name, str, len)) { - readline_add_completion(rs, chr_name); - } - list = list->next; - } - qapi_free_ChardevBackendInfoList(start); -} - void netdev_add_completion(ReadLineState *rs, int nb_args, const char *str) { size_t len; @@ -1498,60 +1474,6 @@ static void peripheral_device_del_completion(ReadLineState *rs, g_slist_free(list); } -void chardev_remove_completion(ReadLineState *rs, int nb_args, const char *str) -{ - size_t len; - ChardevInfoList *list, *start; - - if (nb_args != 2) { - return; - } - len = strlen(str); - readline_set_completion_index(rs, len); - - start = list = qmp_query_chardev(NULL); - while (list) { - ChardevInfo *chr = list->value; - - if (!strncmp(chr->label, str, len)) { - readline_add_completion(rs, chr->label); - } - list = list->next; - } - qapi_free_ChardevInfoList(start); -} - -static void ringbuf_completion(ReadLineState *rs, const char *str) -{ - size_t len; - ChardevInfoList *list, *start; - - len = strlen(str); - readline_set_completion_index(rs, len); - - start = list = qmp_query_chardev(NULL); - while (list) { - ChardevInfo *chr_info = list->value; - - if (!strncmp(chr_info->label, str, len)) { - Chardev *chr = qemu_chr_find(chr_info->label); - if (chr && CHARDEV_IS_RINGBUF(chr)) { - readline_add_completion(rs, chr_info->label); - } - } - list = list->next; - } - qapi_free_ChardevInfoList(start); -} - -void ringbuf_write_completion(ReadLineState *rs, int nb_args, const char *str) -{ - if (nb_args != 2) { - return; - } - ringbuf_completion(rs, str); -} - void device_del_completion(ReadLineState *rs, int nb_args, const char *str) { size_t len; |