From: Rusty Russell Date: Tue, 12 Jun 2018 02:33:51 +0000 (+0930) Subject: tools/configurator: Better argument handling, particularly unknown arguments. X-Git-Url: http://git.ozlabs.org/?a=commitdiff_plain;h=f872966ce8bc61a91af733f405ba8fcce18f85a2;p=ccan tools/configurator: Better argument handling, particularly unknown arguments. Signed-off-by: Rusty Russell --- diff --git a/tools/configurator/configurator.c b/tools/configurator/configurator.c index dae15446..afb67ca8 100644 --- a/tools/configurator/configurator.c +++ b/tools/configurator/configurator.c @@ -752,6 +752,10 @@ int main(int argc, const char *argv[]) headerfile = argv[1] + 14; argc--; argv++; + } else if (strcmp(argv[1], "--") == 0) { + break; + } else if (argv[1][0] == '-') { + c12r_errx(2, "Unknown option %s", argv[1]); } else { break; }