[PATCH 03/75] parse-options: allow keep-unknown + stop-at-non-opt combination
From: Nguyễn Thái Ngọc Duy <hidden>
Date: 2018-12-27 16:25:57
Subsystem:
the rest · Maintainer:
Linus Torvalds
From: Nguyễn Thái Ngọc Duy <hidden>
Date: 2018-12-27 16:25:57
Subsystem:
the rest · Maintainer:
Linus Torvalds
These two are orthogonal. One is about unknown _option_ while the other non-option. Signed-off-by: Nguyễn Thái Ngọc Duy <redacted> --- parse-options.c | 3 --- 1 file changed, 3 deletions(-)
diff --git a/parse-options.c b/parse-options.c
index d47e217b07..4cbcefc262 100644
--- a/parse-options.c
+++ b/parse-options.c@@ -426,9 +426,6 @@ void parse_options_start(struct parse_opt_ctx_t *ctx, ctx->prefix = prefix; ctx->cpidx = ((flags & PARSE_OPT_KEEP_ARGV0) != 0); ctx->flags = flags; - if ((flags & PARSE_OPT_KEEP_UNKNOWN) && - (flags & PARSE_OPT_STOP_AT_NON_OPTION)) - die("STOP_AT_NON_OPTION and KEEP_UNKNOWN don't go together"); if ((flags & PARSE_OPT_ONE_SHOT) && (flags & PARSE_OPT_KEEP_ARGV0)) BUG("Can't keep argv0 if you don't have it");
--
2.20.0.482.g66447595a7