From patchwork Thu Feb 11 13:45:01 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 45126 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 88BCCB7CB8 for ; Fri, 12 Feb 2010 00:50:57 +1100 (EST) Received: from localhost ([127.0.0.1]:34305 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NfZQu-00044Y-MB for incoming@patchwork.ozlabs.org; Thu, 11 Feb 2010 08:50:16 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NfZPm-000404-RG for qemu-devel@nongnu.org; Thu, 11 Feb 2010 08:49:06 -0500 Received: from [199.232.76.173] (port=58086 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NfZPm-0003zt-AC for qemu-devel@nongnu.org; Thu, 11 Feb 2010 08:49:06 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NfZPl-0006Qe-3j for qemu-devel@nongnu.org; Thu, 11 Feb 2010 08:49:06 -0500 Received: from oxygen.pond.sub.org ([213.239.205.148]:40528) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NfZOq-0006GG-HK for qemu-devel@nongnu.org; Thu, 11 Feb 2010 08:49:05 -0500 Received: from blackfin.pond.sub.org (pD951BCD9.dip.t-dialin.net [217.81.188.217]) by oxygen.pond.sub.org (Postfix) with ESMTPA id 2C59E2DD30F for ; Thu, 11 Feb 2010 14:45:04 +0100 (CET) Received: by blackfin.pond.sub.org (Postfix, from userid 500) id 4A7EE2A6; Thu, 11 Feb 2010 14:45:03 +0100 (CET) From: Markus Armbruster To: qemu-devel@nongnu.org Date: Thu, 11 Feb 2010 14:45:01 +0100 Message-Id: <1265895902-15664-6-git-send-email-armbru@redhat.com> X-Mailer: git-send-email 1.6.6 In-Reply-To: <1265895902-15664-1-git-send-email-armbru@redhat.com> References: <1265895902-15664-1-git-send-email-armbru@redhat.com> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Cc: Mark McLoughlin Subject: [Qemu-devel] [PATCH 5/6] net: info network shows only VLAN clients, fix X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Clients not associated with a VLAN exist since commit d80b9fc6. Signed-off-by: Markus Armbruster --- net.c | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/net.c b/net.c index fb425e3..fb89f94 100644 --- a/net.c +++ b/net.c @@ -1210,16 +1210,23 @@ void net_set_boot_mask(int net_boot_mask) void do_info_network(Monitor *mon) { VLANState *vlan; + VLANClientState *vc; QTAILQ_FOREACH(vlan, &vlans, next) { - VLANClientState *vc; - monitor_printf(mon, "VLAN %d devices:\n", vlan->id); QTAILQ_FOREACH(vc, &vlan->clients, next) { monitor_printf(mon, " %s: %s\n", vc->name, vc->info_str); } } + monitor_printf(mon, "Devices not on any VLAN:\n"); + QTAILQ_FOREACH(vc, &non_vlan_clients, next) { + monitor_printf(mon, " %s: %s", vc->name, vc->info_str); + if (vc->peer) { + monitor_printf(mon, " peer=%s", vc->peer->name); + } + monitor_printf(mon, "\n"); + } } void do_set_link(Monitor *mon, const QDict *qdict)