[PATCH] Add -q flag to hostapd in order to control log level

Orr Mazor orrmazor at gmail.com
Tue May 3 07:54:28 PDT 2022


Useful to set log level from startup.
The opposite to the existing -d flag to provide
full control over log level from startup.
Same as the existing flag in wpa_supplicant

Signed-off-by: Orr Mazor <o.mazor at genexis.eu>
---
 hostapd/main.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/hostapd/main.c b/hostapd/main.c
index 4503d24ae..0a40459ef 100644
--- a/hostapd/main.c
+++ b/hostapd/main.c
@@ -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.25.1




More information about the Hostap mailing list