All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xl: Die on unknown options
@ 2015-10-23 15:44 Ian Jackson
  2015-10-26 10:52 ` Wei Liu
  0 siblings, 1 reply; 3+ messages in thread
From: Ian Jackson @ 2015-10-23 15:44 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson, Wei Liu, Ian Campbell

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>
---
 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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-11-03 16:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-23 15:44 [PATCH] xl: Die on unknown options Ian Jackson
2015-10-26 10:52 ` Wei Liu
2015-11-03 16:59   ` Ian Campbell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.