xl: Die on unknown options
PATCH 1/1 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 <[email protected]>
--- tools/libxl/xl_cmdimpl.c | 1 + 1 file changed, 1 insertion(+)
tools/libxl/xl_cmdimpl.c +1 -0
@@ -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);
Signature · 1 line
1.7.10.4
Quoted 5 lines · Ian Jackson
def_getoptwould print a message to stderr, but blunder on anyway.Sadly this is probably not a backport candidate.
Signed-off-by Ian Jackson <[email protected]>
Acked-by Wei Liu <[email protected]>
Quoted 18 lines
--- tools/libxl/xl_cmdimpl.c | 1 + 1 file changed, 1 insertion(+)tools/libxl/xl_cmdimpl.c +1
-0@@ -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);Signature · 1 line
1.7.10.4
Ian Campbell
AppliedQuoted 8 lines · Wei Liu
Quoted 5 lines · Ian Jackson
def_getoptwould print a message to stderr, but blunder on anyway.Sadly this is probably not a backport candidate.
Signed-off-by Ian Jackson <[email protected]>Acked-by Wei Liu <[email protected]>
Applied.
Quoted 5 lines
Quoted 5 lines
---
tools/libxl/xl_cmdimpl.c | 1 +1 file changed, 1 insertion(+)
Quoted 13 lines
Quoted 12 lines
tools/libxl/xl_cmdimpl.c +1
-0@@ -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') {Quoted 1 line
help(helpstr);
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel