From 16e755754f1ca694355c0f8f73045cdcd8c27567 Mon Sep 17 00:00:00 2001 From: Orr Mazor Date: Tue, 3 May 2022 16:54:28 +0200 Subject: [PATCH] Add -q flag to hostapd in order to control log level 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 --- hostapd/main.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/hostapd/main.c b/hostapd/main.c index 4503d24ae..21932d1be 100644 --- a/hostapd/main.c +++ b/hostapd/main.c @@ -466,7 +466,7 @@ static void usage(void) show_version(); fprintf(stderr, "\n" - "usage: hostapd [-hdBKtv] [-P ] [-e ] " + "usage: hostapd [-hdBKtvq] [-P ] [-e ] " "\\\n" " [-g ] [-G ]\\\n" " [-i ]\\\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; -- 2.47.2