3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-25 17:59:25 +01:00

main: Fix the order of --help and -h option handling

This commit is contained in:
Marcel Holtmann 2018-09-14 15:18:09 +02:00
parent b88388b172
commit 5126459ecc

View File

@ -359,7 +359,7 @@ int main(int argc, char *argv[])
for (;;) { for (;;) {
int opt; int opt;
opt = getopt_long(argc, argv, "Bi:I:p:P:c:vd::h", opt = getopt_long(argc, argv, "Bi:I:p:P:c:d::vh",
main_options, NULL); main_options, NULL);
if (opt < 0) if (opt < 0)
break; break;
@ -380,9 +380,6 @@ int main(int argc, char *argv[])
case 'P': case 'P':
nophys = optarg; nophys = optarg;
break; break;
case 'v':
printf("%s\n", VERSION);
return EXIT_SUCCESS;
case 'c': case 'c':
config_dir = optarg; config_dir = optarg;
break; break;
@ -400,6 +397,9 @@ int main(int argc, char *argv[])
else else
debugopt = "*"; debugopt = "*";
break; break;
case 'v':
printf("%s\n", VERSION);
return EXIT_SUCCESS;
case 'h': case 'h':
usage(); usage();
return EXIT_SUCCESS; return EXIT_SUCCESS;