projects
/
ccan
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1239aa2
)
tools/configurator: Better argument handling, particularly unknown arguments.
author
Rusty Russell
<rusty@rustcorp.com.au>
Tue, 12 Jun 2018 02:33:51 +0000
(12:03 +0930)
committer
Rusty Russell
<rusty@rustcorp.com.au>
Tue, 12 Jun 2018 02:33:51 +0000
(12:03 +0930)
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
tools/configurator/configurator.c
patch
|
blob
|
history
diff --git
a/tools/configurator/configurator.c
b/tools/configurator/configurator.c
index dae15446e67417ef8f02d3d07b259dbe33925963..afb67ca8ce269dcdae605de0c1a6913f4aaa9b8f 100644
(file)
--- 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;
}