All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ v1] shared/shell: Always set stdout to be line buffered
@ 2025-01-16 20:39 Luiz Augusto von Dentz
  2025-01-16 22:10 ` [BlueZ,v1] " bluez.test.bot
  2025-01-17 18:10 ` [PATCH BlueZ v1] " patchwork-bot+bluetooth
  0 siblings, 2 replies; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2025-01-16 20:39 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

This always set stdout to be line buffered to avoid cluttering the
output:

https://github.com/bluez/bluez/issues/747#issuecomment-2596840382
---
 src/shared/shell.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/shared/shell.c b/src/shared/shell.c
index aa6c16c8c430..37c747f8fa23 100644
--- a/src/shared/shell.c
+++ b/src/shared/shell.c
@@ -1268,7 +1268,6 @@ static void rl_init(void)
 	/* Allow conditional parsing of the ~/.inputrc file. */
 	rl_readline_name = data.name;
 
-	setlinebuf(stdout);
 	rl_attempted_completion_function = shell_completion;
 
 	rl_erase_empty_line = 1;
@@ -1405,6 +1404,8 @@ done:
 
 	mainloop_init();
 
+	/* Always set stdout as line buffered */
+	setlinebuf(stdout);
 	rl_init();
 
 	data.init = true;
-- 
2.47.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-01-17 18:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-16 20:39 [PATCH BlueZ v1] shared/shell: Always set stdout to be line buffered Luiz Augusto von Dentz
2025-01-16 22:10 ` [BlueZ,v1] " bluez.test.bot
2025-01-17 18:10 ` [PATCH BlueZ v1] " patchwork-bot+bluetooth

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.