[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 6/6] monitor: more accurate completion for host_net_r
From: |
Stefan Hajnoczi |
Subject: |
[Qemu-devel] [PULL 6/6] monitor: more accurate completion for host_net_remove() |
Date: |
Fri, 6 Feb 2015 14:10:52 +0000 |
From: Jason Wang <address@hidden>
Current completion for host_net_remove will show hub ports and clients
that were not peered with hub ports. Fix this.
Cc: Luiz Capitulino <address@hidden>
Signed-off-by: Jason Wang <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
---
monitor.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/monitor.c b/monitor.c
index 7e4f605..e6dc50a 100644
--- a/monitor.c
+++ b/monitor.c
@@ -4597,8 +4597,13 @@ void host_net_remove_completion(ReadLineState *rs, int
nb_args, const char *str)
count = qemu_find_net_clients_except(NULL, ncs,
NET_CLIENT_OPTIONS_KIND_NIC, 255);
for (i = 0; i < count; i++) {
+ int id;
const char *name;
+ if (ncs[i]->info->type == NET_CLIENT_OPTIONS_KIND_HUBPORT ||
+ net_hub_id_for_client(ncs[i], &id)) {
+ continue;
+ }
name = ncs[i]->name;
if (!strncmp(str, name, len)) {
readline_add_completion(rs, name);
--
2.1.0
- [Qemu-devel] [PULL 0/6] Net patches, Stefan Hajnoczi, 2015/02/06
- [Qemu-devel] [PULL 1/6] MAINTAINERS: add Jason Wang as net subsystem maintainer, Stefan Hajnoczi, 2015/02/06
- [Qemu-devel] [PULL 2/6] rtl8139: simplify timer logic, Stefan Hajnoczi, 2015/02/06
- [Qemu-devel] [PULL 3/6] monitor: print hub port name during info network, Stefan Hajnoczi, 2015/02/06
- [Qemu-devel] [PULL 4/6] net: remove the wrong comment in net_init_hubport(), Stefan Hajnoczi, 2015/02/06
- [Qemu-devel] [PULL 5/6] net: del hub port when peer is deleted, Stefan Hajnoczi, 2015/02/06
- [Qemu-devel] [PULL 6/6] monitor: more accurate completion for host_net_remove(),
Stefan Hajnoczi <=
- Re: [Qemu-devel] [PULL 0/6] Net patches, Peter Maydell, 2015/02/06