Skip to contentSkip to conversation

xl: Die on unknown options

PATCH Applied Ian Jackson 3 participants 3 messages Oct 23, 2015 – Nov 3, 2015

lore
Share & tools
lore
#0 lore raw

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.

---
 tools/libxl/xl_cmdimpl.c |    1 +
 1 file changed, 1 insertion(+)
tools/libxl/xl_cmdimpl.c +1 -0
index ea43761..de28593 100644
@@ -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
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Ian Jackson

def_getopt would print a message to stderr, but blunder on anyway.

Sadly this is probably not a backport candidate.

Quoted 18 lines
---
 tools/libxl/xl_cmdimpl.c |    1 +
 1 file changed, 1 insertion(+)
tools/libxl/xl_cmdimpl.c +1 -0
index ea43761..de28593 100644
@@ -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
Applied
#2 lore raw
Quoted 8 lines · Wei Liu
Quoted 5 lines · Ian Jackson

def_getopt would print a message to stderr, but blunder on anyway.

Sadly this is probably not a backport candidate.

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
index ea43761..de28593 100644
@@ -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