diff mbox series

[7/7] wpa_cli: don't select iface when global

Message ID 20240309194228.4186699-7-janusz.dziedzic@gmail.com
State Accepted
Headers show
Series [1/7] tests: remotehost: extend proc api | expand

Commit Message

Janusz Dziedzic March 9, 2024, 7:42 p.m. UTC
In case we run command like:
wpa_cli -g <global_ctrl_path> command

don't print
"Selected interface " message.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@gmail.com>
---
 wpa_supplicant/wpa_cli.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/wpa_supplicant/wpa_cli.c b/wpa_supplicant/wpa_cli.c
index b1334e2e6..54d6505b4 100644
--- a/wpa_supplicant/wpa_cli.c
+++ b/wpa_supplicant/wpa_cli.c
@@ -5129,7 +5129,7 @@  int main(int argc, char *argv[])
 
 	eloop_register_signal_terminate(wpa_cli_terminate, NULL);
 
-	if (ctrl_ifname == NULL)
+	if (ctrl_ifname == NULL && !global)
 		ctrl_ifname = wpa_cli_get_default_ifname();
 
 	if (reconnect && action_file && ctrl_ifname) {