Skip to content

Commit

Permalink
mxqd: abort with USAGE on unknown option
Browse files Browse the repository at this point in the history
We should not continue with a misstyped option (eg --nolog instead of --no-log)
  • Loading branch information
donald committed Oct 9, 2015
1 parent a5807d0 commit d19c21d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions mxqd.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,7 @@ int server_init(struct mxq_server *server, int argc, char *argv[])

mx_getopt_init(&optctl, argc-1, &argv[1], opts);

optctl.flags = MX_FLAG_STOPONUNKNOWN|MX_FLAG_STOPONNOOPT;
// optctl.flags = MX_FLAG_STOPONUNKNOWN;
// optctl.flags = MX_FLAG_STOPONUNKNOWN|MX_FLAG_STOPONNOOPT;

while ((opt=mx_getopt(&optctl, &i)) != MX_GETOPT_END) {
if (opt == MX_GETOPT_ERROR) {
Expand Down

0 comments on commit d19c21d

Please sign in to comment.