From 1a8595931ac6ffb76c2e10675ba3a39e807f02fd Mon Sep 17 00:00:00 2001 From: Zhi Yong Wu Date: Tue, 24 Jul 2012 16:35:16 +0100 Subject: net: Make "info network" output more readable info Reviewed-by: Jan Kiszka Signed-off-by: Zhi Yong Wu Signed-off-by: Stefan Hajnoczi Reviewed-by: Laszlo Ersek --- net/hub.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'net/hub.c') diff --git a/net/hub.c b/net/hub.c index 900fa4ebb9..522fe990a2 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 : ""); + if (port->nc.peer) { + monitor_printf(mon, " \\ "); + print_net_client(mon, port->nc.peer); + } } } } -- cgit v1.2.3