From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:49206) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SXekN-0002Gx-7f for qemu-devel@nongnu.org; Thu, 24 May 2012 16:35:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SXekL-00034G-Bp for qemu-devel@nongnu.org; Thu, 24 May 2012 16:34:58 -0400 Received: from david.siemens.de ([192.35.17.14]:25304) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SXekL-00033A-2J for qemu-devel@nongnu.org; Thu, 24 May 2012 16:34:57 -0400 Message-ID: <4FBE9B62.1030004@siemens.com> Date: Thu, 24 May 2012 17:34:42 -0300 From: Jan Kiszka MIME-Version: 1.0 References: <1337882362-20100-1-git-send-email-zwu.kernel@gmail.com> <1337882362-20100-14-git-send-email-zwu.kernel@gmail.com> In-Reply-To: <1337882362-20100-14-git-send-email-zwu.kernel@gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3 13/16] net: Make the monitor output more reasonable hub info List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "zwu.kernel@gmail.com" Cc: "pbonzini@redhat.com" , "wuzhy@linux.vnet.ibm.com" , "qemu-devel@nongnu.org" , "kvm@vger.kernel.org" , "stefanha@linux.vnet.ibm.com" On 2012-05-24 14:59, zwu.kernel@gmail.com wrote: > From: Zhi Yong Wu > > Signed-off-by: Zhi Yong Wu > --- > net.c | 7 ++++++- > net/hub.c | 2 +- > 2 files changed, 7 insertions(+), 2 deletions(-) > > diff --git a/net.c b/net.c > index 61dc28d..79ac51f 100644 > --- a/net.c > +++ b/net.c > @@ -887,6 +887,12 @@ static const struct { > }, > }, > #endif /* CONFIG_NET_BRIDGE */ > + [NET_CLIENT_TYPE_HUB] = { > + .type = "hubport", > + .desc = { > + { /* end of list */ } > + }, > + }, > }; > > int net_client_init(Monitor *mon, QemuOpts *opts, int is_netdev) > @@ -1079,7 +1085,6 @@ void do_info_network(Monitor *mon) > NetClientState *nc, *peer; > net_client_type type; > > - monitor_printf(mon, "Devices not on any VLAN:\n"); > QTAILQ_FOREACH(nc, &net_clients, next) { > peer = nc->peer; > type = nc->info->type; > diff --git a/net/hub.c b/net/hub.c > index 0cc385e..8a583ab 100644 > --- a/net/hub.c > +++ b/net/hub.c > @@ -193,7 +193,7 @@ void net_hub_info(Monitor *mon) > QLIST_FOREACH(hub, &hubs, next) { > monitor_printf(mon, "hub %u\n", hub->id); > QLIST_FOREACH(port, &hub->ports, next) { > - monitor_printf(mon, " port %u peer %s\n", port->id, > + monitor_printf(mon, " \\ %s\n", > port->nc.peer ? port->nc.peer->name : ""); > } > } I still do not agree with this formatting (peer -> hubport + hub -> abbreviated peers instead of just hub -> peers). But the series has a higher value than this, and we can fix on top - unless there is a need for another round anyway. Jan -- Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux