3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-25 09:39: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 (;;) {
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);
if (opt < 0)
break;
@ -380,9 +380,6 @@ int main(int argc, char *argv[])
case 'P':
nophys = optarg;
break;
case 'v':
printf("%s\n", VERSION);
return EXIT_SUCCESS;
case 'c':
config_dir = optarg;
break;
@ -400,6 +397,9 @@ int main(int argc, char *argv[])
else
debugopt = "*";
break;
case 'v':
printf("%s\n", VERSION);
return EXIT_SUCCESS;
case 'h':
usage();
return EXIT_SUCCESS;