]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Add -q flag to hostapd in order to control log level
authorOrr Mazor <orrmazor@gmail.com>
Tue, 3 May 2022 14:54:28 +0000 (16:54 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 7 May 2022 18:37:08 +0000 (21:37 +0300)
This allows the debugging level to be reduced from hostapd command line
similarly to the already existing flag in wpa_supplicant.

Signed-off-by: Orr Mazor <o.mazor@genexis.eu>
hostapd/main.c

index 4503d24ae4d3d3fb87927de4ed9f6e8da39045ac..21932d1bea06e7a07df2106c90afe1f7c420995f 100644 (file)
@@ -466,7 +466,7 @@ static void usage(void)
        show_version();
        fprintf(stderr,
                "\n"
-               "usage: hostapd [-hdBKtv] [-P <PID file>] [-e <entropy file>] "
+               "usage: hostapd [-hdBKtvq] [-P <PID file>] [-e <entropy file>] "
                "\\\n"
                "         [-g <global ctrl_iface>] [-G <group>]\\\n"
                "         [-i <comma-separated list of interface names>]\\\n"
@@ -685,7 +685,7 @@ int main(int argc, char *argv[])
 #endif /* CONFIG_DPP */
 
        for (;;) {
-               c = getopt(argc, argv, "b:Bde:f:hi:KP:sSTtu:vg:G:");
+               c = getopt(argc, argv, "b:Bde:f:hi:KP:sSTtu:vg:G:q");
                if (c < 0)
                        break;
                switch (c) {
@@ -758,6 +758,9 @@ int main(int argc, char *argv[])
                                                        &if_names_size, optarg))
                                goto out;
                        break;
+               case 'q':
+                       wpa_debug_level++;
+                       break;
                default:
                        usage();
                        break;