From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LA0HA-0008NL-Qn for qemu-devel@nongnu.org; Tue, 09 Dec 2008 05:57:12 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LA0H7-0008M1-SW for qemu-devel@nongnu.org; Tue, 09 Dec 2008 05:57:12 -0500 Received: from [199.232.76.173] (port=39194 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LA0H7-0008Lf-8J for qemu-devel@nongnu.org; Tue, 09 Dec 2008 05:57:09 -0500 Received: from mail05.svc.cra.dublin.eircom.net ([159.134.118.21]:39878) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1LA0H6-0006JR-P9 for qemu-devel@nongnu.org; Tue, 09 Dec 2008 05:57:08 -0500 From: Mark McLoughlin Date: Tue, 9 Dec 2008 10:55:41 +0000 Message-Id: <1228820143-23580-3-git-send-email-markmc@redhat.com> In-Reply-To: <1228820143-23580-2-git-send-email-markmc@redhat.com> References: <> <1228820143-23580-1-git-send-email-markmc@redhat.com> <1228820143-23580-2-git-send-email-markmc@redhat.com> Subject: [Qemu-devel] [PATCH 2/4] Add device index to 'info network' output Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Mark McLoughlin , Rusty Russell , qemu-devel@nongnu.org The 'set_link' command requires the user to specify a device index. Signed-off-by: Mark McLoughlin --- net.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/net.c b/net.c index 250519c..35ec501 100644 --- a/net.c +++ b/net.c @@ -1557,9 +1557,10 @@ void do_info_network(void) VLANClientState *vc; for(vlan = first_vlan; vlan != NULL; vlan = vlan->next) { + int i = 0; term_printf("VLAN %d devices:\n", vlan->id); for(vc = vlan->first_client; vc != NULL; vc = vc->next) - term_printf(" %s\n", vc->info_str); + term_printf(" %d %s\n", i++, vc->info_str); } } -- 1.5.4.3