[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 6 of 7] xl: block-detach command line parsing
Command line arguments start at argv[2]. diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c --- a/tools/libxl/xl_cmdimpl.c +++ b/tools/libxl/xl_cmdimpl.c @@ -3744,7 +3744,7 @@ int main_blockdetach(int argc, char **ar int opt; libxl_device_disk disk; - if (argc != 3) { + if (argc != 4) { help("block-detach"); exit(0); } @@ -3759,12 +3759,12 @@ int main_blockdetach(int argc, char **ar } } - if (domain_qualifier_to_domid(argv[1], &domid, 0) < 0) { - fprintf(stderr, "%s is an invalid domain identifier\n", argv[1]); + if (domain_qualifier_to_domid(argv[2], &domid, 0) < 0) { + fprintf(stderr, "%s is an invalid domain identifier\n", argv[2]); exit(1); } - if (libxl_devid_to_device_disk(&ctx, domid, argv[2], &disk)) { - fprintf(stderr, "Error: Device %s not connected.\n", argv[2]); + if (libxl_devid_to_device_disk(&ctx, domid, argv[3], &disk)) { + fprintf(stderr, "Error: Device %s not connected.\n", argv[3]); exit(1); } if (libxl_device_disk_del(&ctx, &disk, 1)) { _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |