aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Wang <jasowang@redhat.com>2015-02-02 15:06:35 +0800
committerStefan Hajnoczi <stefanha@redhat.com>2015-02-06 14:06:44 +0000
commita6efd6ae7b8696bfeb0336826b01bfe0e1840154 (patch)
tree575c479a85dca8be7962953fbf27d97f12d4c696
parent237c255c6cefefda9c5dd077860cfa20a77d9a6a (diff)
monitor: print hub port name during info network
Signed-off-by: Jason Wang <jasowang@redhat.com> Message-id: 1422860798-17495-1-git-send-email-jasowang@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
-rw-r--r--net/hub.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/hub.c b/net/hub.c
index 7e0f2d6f0d..ef09d5f44d 100644
--- a/net/hub.c
+++ b/net/hub.c
@@ -245,9 +245,12 @@ void net_hub_info(Monitor *mon)
QLIST_FOREACH(hub, &hubs, next) {
monitor_printf(mon, "hub %d\n", hub->id);
QLIST_FOREACH(port, &hub->ports, next) {
+ monitor_printf(mon, " \\ %s", port->nc.name);
if (port->nc.peer) {
- monitor_printf(mon, " \\ ");
+ monitor_printf(mon, ": ");
print_net_client(mon, port->nc.peer);
+ } else {
+ monitor_printf(mon, "\n");
}
}
}