From: Ian Jackson Date: Fri, 23 Oct 2015 15:44:11 +0000 (+0100) Subject: xl: Die on unknown options X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=8ce89a914e832160e28ef9c312f7ffc105d43967;p=people%2Fliuw%2Flibxenctrl-split%2Fxen.git xl: Die on unknown options 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 Acked-by: Wei Liu --- diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c index 646b2817d2..be4081854e 100644 --- a/tools/libxl/xl_cmdimpl.c +++ b/tools/libxl/xl_cmdimpl.c @@ -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);