From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42112) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YIB5x-0007Ca-35 for qemu-devel@nongnu.org; Mon, 02 Feb 2015 02:06:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YIB5t-0001ba-2w for qemu-devel@nongnu.org; Mon, 02 Feb 2015 02:06:53 -0500 Received: from mx1.redhat.com ([209.132.183.28]:42192) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YIB5s-0001b9-RV for qemu-devel@nongnu.org; Mon, 02 Feb 2015 02:06:49 -0500 From: Jason Wang Date: Mon, 2 Feb 2015 15:06:35 +0800 Message-Id: <1422860798-17495-1-git-send-email-jasowang@redhat.com> Subject: [Qemu-devel] [PATCH 1/4] monitor: print hub port name during info network List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: aliguori@amazon.com, stefanha@redhat.com, qemu-devel@nongnu.org Cc: Jason Wang Signed-off-by: Jason Wang --- net/hub.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/net/hub.c b/net/hub.c index 7e0f2d6..ef09d5f 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"); } } } -- 1.9.1