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

Re: [Xen-devel] [PATCH] xl: Die on unknown options



On Fri, Oct 23, 2015 at 04:44:11PM +0100, Ian Jackson wrote:
> def_getopt would print a message to stderr, but blunder on anyway.
> 
> Sadly this is probably not a backport candidate.
> 
> Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>

Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx>

> ---
>  tools/libxl/xl_cmdimpl.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
> index ea43761..de28593 100644
> --- a/tools/libxl/xl_cmdimpl.c
> +++ b/tools/libxl/xl_cmdimpl.c
> @@ -2759,6 +2759,7 @@ static int def_getopt(int argc, char * const argv[],
>              exit(0);
>          }
>          fprintf(stderr, "option `%c' not supported.\n", optopt);
> +        exit(2);
>      }
>      if (opt == 'h') {
>          help(helpstr);
> -- 
> 1.7.10.4

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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