From d19c21ddaef6619080011d0e9a51afd4131fe536 Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Fri, 9 Oct 2015 09:48:31 +0200 Subject: [PATCH] mxqd: abort with USAGE on unknown option We should not continue with a misstyped option (eg --nolog instead of --no-log) --- mxqd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mxqd.c b/mxqd.c index 5239c27..dc4e579 100644 --- a/mxqd.c +++ b/mxqd.c @@ -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) {