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

[Xen-changelog] [xen-unstable] xl: block-list command line parsing



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1275891221 -3600
# Node ID b121c5f8360f7edee342d687933f379069ca3487
# Parent  aaef5d82344df4d94e46f73a4f2284ceb081e99e
xl: block-list command line parsing

Command line arguments start at argv[2].

Signed-off-by: Eric Chanudet <eric.chanudet@xxxxxxxxxx>
---
 tools/libxl/xl_cmdimpl.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff -r aaef5d82344d -r b121c5f8360f tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c  Mon Jun 07 07:13:02 2010 +0100
+++ b/tools/libxl/xl_cmdimpl.c  Mon Jun 07 07:13:41 2010 +0100
@@ -3709,7 +3709,7 @@ int main_blocklist(int argc, char **argv
     libxl_device_disk *disks;
     libxl_diskinfo diskinfo;
 
-    if (argc < 2) {
+    if (argc < 3) {
         help("block-list");
         exit(0);
     }
@@ -3726,7 +3726,7 @@ int main_blocklist(int argc, char **argv
 
     printf("%-5s %-3s %-6s %-5s %-6s %-8s %-30s\n",
            "Vdev", "BE", "handle", "state", "evt-ch", "ring-ref", "BE-path");
-    for (++argv, --argc; argc > 0; --argc, ++argv) {
+    for (argv += 2, argc -= 2; argc > 0; --argc, ++argv) {
         if (domain_qualifier_to_domid(*argv, &domid, 0) < 0) {
             fprintf(stderr, "%s is an invalid domain identifier\n", *argv);
             continue;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.