Throw an error if non-option arguments are supplied

This commit is contained in:
pooler 2012-02-11 02:32:49 +01:00
parent 9435078a8e
commit a605a2ae4d

View file

@ -838,6 +838,11 @@ static void parse_cmdline(int argc, char *argv[])
parse_arg(key, optarg); parse_arg(key, optarg);
} }
if (optind < argc) {
fprintf(stderr, "%s: unsupported non-option argument '%s'\n",
argv[0], argv[optind]);
show_usage_and_exit(1);
}
parse_config(); parse_config();
} }