From: Vladimír Čunát Date: Thu, 9 Jan 2020 13:51:44 +0000 (+0100) Subject: main: tidy up getopt X-Git-Tag: v5.0.0~5^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ad98d30dcea4b57e48bf83a8b2f51149de0a49ad;p=thirdparty%2Fknot-resolver.git main: tidy up getopt - consistent order of the options on the three places in parse_args() - drop remains of -m -k -K It didn't seem to cause any problems except confusion in $ kresd -k kresd: option requires an argument -- 'k' --- diff --git a/daemon/main.c b/daemon/main.c index d47e8a535..126e54ac0 100644 --- a/daemon/main.c +++ b/daemon/main.c @@ -354,7 +354,6 @@ static int parse_args(int argc, char **argv, struct args *args) struct option opts[] = { {"addr", required_argument, 0, 'a'}, {"tls", required_argument, 0, 't'}, - {"fd", required_argument, 0, 'S'}, {"config", required_argument, 0, 'c'}, {"forks", required_argument, 0, 'f'}, {"noninteractive", no_argument, 0, 'n'}, @@ -362,9 +361,10 @@ static int parse_args(int argc, char **argv, struct args *args) {"quiet", no_argument, 0, 'q'}, {"version", no_argument, 0, 'V'}, {"help", no_argument, 0, 'h'}, + {"fd", required_argument, 0, 'S'}, {0, 0, 0, 0} }; - while ((c = getopt_long(argc, argv, "a:t:S:c:f:nm:K:k:vqVh", opts, &li)) != -1) { + while ((c = getopt_long(argc, argv, "a:t:c:f:nvqVhS:", opts, &li)) != -1) { switch (c) { case 'a':