aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorZhi Yong Wu <wuzhy@linux.vnet.ibm.com>2012-07-24 16:35:16 +0100
committerStefan Hajnoczi <stefanha@linux.vnet.ibm.com>2012-08-01 13:32:11 +0100
commit1a8595931ac6ffb76c2e10675ba3a39e807f02fd (patch)
treeb8932738c6433e19d394612e1857689f40d21a50 /net
parentb20c6b9e47772b9162ed194e7b2884afa6a354ab (diff)
downloadqemu-1a8595931ac6ffb76c2e10675ba3a39e807f02fd.zip
qemu-1a8595931ac6ffb76c2e10675ba3a39e807f02fd.tar.gz
qemu-1a8595931ac6ffb76c2e10675ba3a39e807f02fd.tar.bz2
net: Make "info network" output more readable info
Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Diffstat (limited to 'net')
-rw-r--r--net/hub.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/hub.c b/net/hub.c
index 900fa4e..522fe99 100644
--- a/net/hub.c
+++ b/net/hub.c
@@ -223,8 +223,10 @@ 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, " port %d peer %s\n", port->id,
- port->nc.peer ? port->nc.peer->name : "<none>");
+ if (port->nc.peer) {
+ monitor_printf(mon, " \\ ");
+ print_net_client(mon, port->nc.peer);
+ }
}
}
}