From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LA48Q-0005kZ-7c for qemu-devel@nongnu.org; Tue, 09 Dec 2008 10:04:26 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LA48P-0005kF-MX for qemu-devel@nongnu.org; Tue, 09 Dec 2008 10:04:25 -0500 Received: from [199.232.76.173] (port=41928 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LA48P-0005kA-FH for qemu-devel@nongnu.org; Tue, 09 Dec 2008 10:04:25 -0500 Received: from yx-out-1718.google.com ([74.125.44.156]:6234) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LA48P-0003VW-Ix for qemu-devel@nongnu.org; Tue, 09 Dec 2008 10:04:25 -0500 Received: by yx-out-1718.google.com with SMTP id 3so891391yxi.82 for ; Tue, 09 Dec 2008 07:04:24 -0800 (PST) Message-ID: <493E88F4.8090703@codemonkey.ws> Date: Tue, 09 Dec 2008 09:04:20 -0600 From: Anthony Liguori MIME-Version: 1.0 References: <> <1228820143-23580-1-git-send-email-markmc@redhat.com> <1228820143-23580-2-git-send-email-markmc@redhat.com> <1228820143-23580-3-git-send-email-markmc@redhat.com> In-Reply-To: <1228820143-23580-3-git-send-email-markmc@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [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: Mark McLoughlin Cc: Rusty Russell , qemu-devel@nongnu.org Mark McLoughlin wrote: > 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); > This info command is unfortunately not very well formed, but I still think you should do " id=%d %s\n", i++, vc->info_str. Regards, Anthony Liguori > } > } > >