From: Tim Deegan Subject: [PATCH] xl: tidy up around global '-v' option Date: Thu, 17 Jun 2010 16:57:30 +0100 Message-ID: <20100617155730.GL15976@whitby.uk.xensource.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="JwB53PgKC5A7+0Ej" Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --JwB53PgKC5A7+0Ej Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline xl: tidy up around global '-v' option Signed-off-by: Tim Deegan --JwB53PgKC5A7+0Ej Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: attachment; filename="xl_option" diff -r 98d50e17a1df tools/libxl/xl.c --- a/tools/libxl/xl.c Thu Jun 17 16:53:52 2010 +0100 +++ b/tools/libxl/xl.c Thu Jun 17 16:55:38 2010 +0100 @@ -74,7 +74,7 @@ if (cspec) return cspec->cmd_impl(argc, argv); else if (!strcmp(cmd, "help")) { - help(argv[2]); + help(argv[optind]); exit(0); } else { fprintf(stderr, "command not implemented\n"); diff -r 98d50e17a1df tools/libxl/xl_cmdimpl.c --- a/tools/libxl/xl_cmdimpl.c Thu Jun 17 16:53:52 2010 +0100 +++ b/tools/libxl/xl_cmdimpl.c Thu Jun 17 16:55:38 2010 +0100 @@ -1285,7 +1285,7 @@ struct cmd_spec *cmd; if (!command || !strcmp(command, "help")) { - printf("Usage xl [args]\n\n"); + printf("Usage xl [-v] [args]\n\n"); printf("xl full list of subcommands:\n\n"); for (i = 0; i < cmdtable_len; i++) printf(" %-20s%s\n", @@ -1293,7 +1293,7 @@ } else { cmd = cmdtable_lookup(command); if (cmd) { - printf("Usage: xl %s %s\n\n%s.\n\n", + printf("Usage: xl [-v] %s %s\n\n%s.\n\n", cmd->cmd_name, cmd->cmd_usage, cmd->cmd_desc); --JwB53PgKC5A7+0Ej Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --JwB53PgKC5A7+0Ej--