]> xenbits.xensource.com Git - people/julieng/xen-unstable.git/commitdiff
xl: Die on unknown options
authorIan Jackson <ian.jackson@eu.citrix.com>
Fri, 23 Oct 2015 15:44:11 +0000 (16:44 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 3 Nov 2015 16:30:57 +0000 (16:30 +0000)
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@eu.citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
tools/libxl/xl_cmdimpl.c

index 646b2817d22fed2e3bd8c430da8773e724e734d9..be4081854e28106d378a7a8067ec59f1011f8c03 100644 (file)
@@ -3179,6 +3179,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);