summaryrefslogtreecommitdiff
path: root/monitor.c
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2018-02-21 11:18:35 +0100
committerJason Wang <jasowang@redhat.com>2018-03-05 10:30:15 +0800
commit7cc28cb061040cb089d29de2d9a73f404b94bc66 (patch)
tree9abf2b7143076f19a0753e1092b658b90fd21fbb /monitor.c
parent857d20873d18b3e90c7e7141fe7822f25b707159 (diff)
net: Remove the deprecated 'host_net_add' and 'host_net_remove' HMP commands
They are deprecated since QEMU v2.10, and so far nobody complained that these commands are still necessary for any reason - and since you can use 'netdev_add' and 'netdev_remove' instead, there also should not be any real reason. Since they are also standing in the way for the upcoming 'vlan' clean-up, it's now time to remove them. Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'monitor.c')
-rw-r--r--monitor.c61
1 files changed, 0 insertions, 61 deletions
diff --git a/monitor.c b/monitor.c
index 308a3d9b78..70eb1b9522 100644
--- a/monitor.c
+++ b/monitor.c
@@ -3581,67 +3581,6 @@ void migrate_set_parameter_completion(ReadLineState *rs, int nb_args,
}
}
-void host_net_add_completion(ReadLineState *rs, int nb_args, const char *str)
-{
- int i;
- size_t len;
- if (nb_args != 2) {
- return;
- }
- len = strlen(str);
- readline_set_completion_index(rs, len);
- for (i = 0; host_net_devices[i]; i++) {
- if (!strncmp(host_net_devices[i], str, len)) {
- readline_add_completion(rs, host_net_devices[i]);
- }
- }
-}
-
-void host_net_remove_completion(ReadLineState *rs, int nb_args, const char *str)
-{
- NetClientState *ncs[MAX_QUEUE_NUM];
- int count, i, len;
-
- len = strlen(str);
- readline_set_completion_index(rs, len);
- if (nb_args == 2) {
- count = qemu_find_net_clients_except(NULL, ncs,
- NET_CLIENT_DRIVER_NONE,
- MAX_QUEUE_NUM);
- for (i = 0; i < MIN(count, MAX_QUEUE_NUM); i++) {
- int id;
- char name[16];
-
- if (net_hub_id_for_client(ncs[i], &id)) {
- continue;
- }
- snprintf(name, sizeof(name), "%d", id);
- if (!strncmp(str, name, len)) {
- readline_add_completion(rs, name);
- }
- }
- return;
- } else if (nb_args == 3) {
- count = qemu_find_net_clients_except(NULL, ncs,
- NET_CLIENT_DRIVER_NIC,
- MAX_QUEUE_NUM);
- for (i = 0; i < MIN(count, MAX_QUEUE_NUM); i++) {
- int id;
- const char *name;
-
- if (ncs[i]->info->type == NET_CLIENT_DRIVER_HUBPORT ||
- net_hub_id_for_client(ncs[i], &id)) {
- continue;
- }
- name = ncs[i]->name;
- if (!strncmp(str, name, len)) {
- readline_add_completion(rs, name);
- }
- }
- return;
- }
-}
-
static void vm_completion(ReadLineState *rs, const char *str)
{
size_t len;