[PATCH v2] hostapd_cli: Add newline to command output

Gustavo Bertoli gubertoli at gmail.com
Thu Jun 26 13:34:03 PDT 2025


Now follows wpa_cli logic for printing command output.

Signed-off-by: Gustavo Bertoli <gubertoli at gmail.com>
---
 hostapd/hostapd_cli.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/hostapd/hostapd_cli.c b/hostapd/hostapd_cli.c
index 57702d93b..395b8996f 100644
--- a/hostapd/hostapd_cli.c
+++ b/hostapd/hostapd_cli.c
@@ -221,6 +221,8 @@ static int _wpa_ctrl_command(struct wpa_ctrl *ctrl, const char *cmd, int print)
 	if (print) {
 		buf[len] = '\0';
 		printf("%s", buf);
+		if (interactive && len > 0 && buf[len - 1] != '\n')
+			printf("\n");
 	}
 	return 0;
 }
-- 
2.34.1




More information about the Hostap mailing list