qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 2/4] Add device index to 'info network' output


From: Mark McLoughlin
Subject: [Qemu-devel] [PATCH 2/4] Add device index to 'info network' output
Date: Tue, 9 Dec 2008 10:55:41 +0000

The 'set_link' command requires the user to specify a device index.

Signed-off-by: Mark McLoughlin <address@hidden>
---
 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]