From 8ce89a914e832160e28ef9c312f7ffc105d43967 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Fri, 23 Oct 2015 16:44:11 +0100 Subject: [PATCH] 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 --- 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 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); -- 2.39.5