tools/configurator: Better argument handling, particularly unknown arguments.
[ccan] / tools / configurator / configurator.c
index dae15446e67417ef8f02d3d07b259dbe33925963..afb67ca8ce269dcdae605de0c1a6913f4aaa9b8f 100644 (file)
@@ -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;
                }