* [PATCH BlueZ] shared/shell: add proper line clean to bt_shell_printf
@ 2025-01-17 18:06 Denis Burkov
2025-01-17 18:17 ` Denis Burkov
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Denis Burkov @ 2025-01-17 18:06 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Denis Burkov
---
src/shared/shell.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/shared/shell.c b/src/shared/shell.c
index aa6c16c8c..837152525 100644
--- a/src/shared/shell.c
+++ b/src/shared/shell.c
@@ -719,6 +719,7 @@ void bt_shell_printf(const char *fmt, ...)
saved_line = rl_copy_text(0, rl_end);
if (!data.saved_prompt)
rl_save_prompt();
+ rl_clear_visible_line();
rl_reset_line_state();
}
--
2.45.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH BlueZ] shared/shell: add proper line clean to bt_shell_printf
2025-01-17 18:06 [PATCH BlueZ] shared/shell: add proper line clean to bt_shell_printf Denis Burkov
@ 2025-01-17 18:17 ` Denis Burkov
2025-01-17 18:17 ` Luiz Augusto von Dentz
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: Denis Burkov @ 2025-01-17 18:17 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Denis Burkov
in some terminals (or all?) the line is not cleared before a new one is output
(for example, if you turn on scanning and then try to write something to the terminal,
the output will be mixed - you will get something like this
[JBL T450BT]# h[NEW] Device ****
[JBL T450BT]# he[NEW] Device ****
[JBL T450BT]# hell[NEW] Device ****
[JBL T450BT]# hello[NEW] Device ****
[JBL T450BT]# hello[NEW] Device ****
where "Device ****" is the line that was actually fed to bt_shell_printf
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH BlueZ] shared/shell: add proper line clean to bt_shell_printf
2025-01-17 18:06 [PATCH BlueZ] shared/shell: add proper line clean to bt_shell_printf Denis Burkov
2025-01-17 18:17 ` Denis Burkov
@ 2025-01-17 18:17 ` Luiz Augusto von Dentz
2025-01-17 18:25 ` Denis Burkov
2025-01-17 18:51 ` Denis Burkov
2025-01-17 19:15 ` [BlueZ] " bluez.test.bot
2025-01-23 18:40 ` [PATCH BlueZ] " patchwork-bot+bluetooth
3 siblings, 2 replies; 7+ messages in thread
From: Luiz Augusto von Dentz @ 2025-01-17 18:17 UTC (permalink / raw)
To: Denis Burkov; +Cc: linux-bluetooth
Hi Denis,
On Fri, Jan 17, 2025 at 1:08 PM Denis Burkov <hitechshell@mail.ru> wrote:
We normally expect some description of why this change is required,
for instance what is the output with and without your changes here,
are there artifacts if we don't use rl_clear_visible_line?
> ---
> src/shared/shell.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/src/shared/shell.c b/src/shared/shell.c
> index aa6c16c8c..837152525 100644
> --- a/src/shared/shell.c
> +++ b/src/shared/shell.c
> @@ -719,6 +719,7 @@ void bt_shell_printf(const char *fmt, ...)
> saved_line = rl_copy_text(0, rl_end);
> if (!data.saved_prompt)
> rl_save_prompt();
> + rl_clear_visible_line();
> rl_reset_line_state();
> }
>
> --
> 2.45.2
>
>
--
Luiz Augusto von Dentz
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH BlueZ] shared/shell: add proper line clean to bt_shell_printf
2025-01-17 18:17 ` Luiz Augusto von Dentz
@ 2025-01-17 18:25 ` Denis Burkov
2025-01-17 18:51 ` Denis Burkov
1 sibling, 0 replies; 7+ messages in thread
From: Denis Burkov @ 2025-01-17 18:25 UTC (permalink / raw)
To: Luiz Augusto von Dentz; +Cc: linux-bluetooth
On Fri, Jan 17, 2025 at 01:17:31PM -0500, Luiz Augusto von Dentz wrote:
> Hi Denis,
>
> On Fri, Jan 17, 2025 at 1:08 PM Denis Burkov <hitechshell@mail.ru> wrote:
>
> We normally expect some description of why this change is required,
> for instance what is the output with and without your changes here,
> are there artifacts if we don't use rl_clear_visible_line?
in some terminals (or all?) the line is not cleared before a new one is output
(for example, if you turn on scanning and then try to write something to the terminal,
the output will be mixed - you will get something like this
[JBL T450BT]# h[NEW] Device ****
[JBL T450BT]# he[NEW] Device ****
[JBL T450BT]# hell[NEW] Device ****
[JBL T450BT]# hello[NEW] Device ****
[JBL T450BT]# hello[NEW] Device ****
where "Device ****" is the line that was actually fed to bt_shell_printf
this was reproduced at least on simple terminal and alacritty (on gentoo)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH BlueZ] shared/shell: add proper line clean to bt_shell_printf
2025-01-17 18:17 ` Luiz Augusto von Dentz
2025-01-17 18:25 ` Denis Burkov
@ 2025-01-17 18:51 ` Denis Burkov
1 sibling, 0 replies; 7+ messages in thread
From: Denis Burkov @ 2025-01-17 18:51 UTC (permalink / raw)
To: Luiz Augusto von Dentz; +Cc: linux-bluetooth
Issue was reporduced on:
PostmarketOS (gnome-terminal)
Archlinux (konsole, alacritty)
Gentoo (simple terminal, alacritty)
(this list is not complete - only those systems/terminals that I had
quick access to)
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [BlueZ] shared/shell: add proper line clean to bt_shell_printf
2025-01-17 18:06 [PATCH BlueZ] shared/shell: add proper line clean to bt_shell_printf Denis Burkov
2025-01-17 18:17 ` Denis Burkov
2025-01-17 18:17 ` Luiz Augusto von Dentz
@ 2025-01-17 19:15 ` bluez.test.bot
2025-01-23 18:40 ` [PATCH BlueZ] " patchwork-bot+bluetooth
3 siblings, 0 replies; 7+ messages in thread
From: bluez.test.bot @ 2025-01-17 19:15 UTC (permalink / raw)
To: linux-bluetooth, hitechshell
[-- Attachment #1: Type: text/plain, Size: 1620 bytes --]
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=926556
---Test result---
Test Summary:
CheckPatch PENDING 0.25 seconds
GitLint PENDING 0.27 seconds
BuildEll PASS 20.39 seconds
BluezMake PASS 1474.80 seconds
MakeCheck PASS 13.32 seconds
MakeDistcheck PASS 159.58 seconds
CheckValgrind PASS 212.01 seconds
CheckSmatch WARNING 269.32 seconds
bluezmakeextell PASS 98.06 seconds
IncrementalBuild PENDING 0.29 seconds
ScanBuild PASS 851.99 seconds
Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script
Output:
##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:
##############################
Test: CheckSmatch - WARNING
Desc: Run smatch tool with source
Output:
src/shared/shell.c: note: in included file (through /usr/include/readline/readline.h):src/shared/shell.c: note: in included file (through /usr/include/readline/readline.h):src/shared/shell.c: note: in included file (through /usr/include/readline/readline.h):
##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series
Output:
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH BlueZ] shared/shell: add proper line clean to bt_shell_printf
2025-01-17 18:06 [PATCH BlueZ] shared/shell: add proper line clean to bt_shell_printf Denis Burkov
` (2 preceding siblings ...)
2025-01-17 19:15 ` [BlueZ] " bluez.test.bot
@ 2025-01-23 18:40 ` patchwork-bot+bluetooth
3 siblings, 0 replies; 7+ messages in thread
From: patchwork-bot+bluetooth @ 2025-01-23 18:40 UTC (permalink / raw)
To: Denis Burkov; +Cc: linux-bluetooth
Hello:
This patch was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:
On Fri, 17 Jan 2025 23:06:11 +0500 you wrote:
> ---
> src/shared/shell.c | 1 +
> 1 file changed, 1 insertion(+)
Here is the summary with links:
- [BlueZ] shared/shell: add proper line clean to bt_shell_printf
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=f2ed57ed555b
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-01-23 18:40 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-17 18:06 [PATCH BlueZ] shared/shell: add proper line clean to bt_shell_printf Denis Burkov
2025-01-17 18:17 ` Denis Burkov
2025-01-17 18:17 ` Luiz Augusto von Dentz
2025-01-17 18:25 ` Denis Burkov
2025-01-17 18:51 ` Denis Burkov
2025-01-17 19:15 ` [BlueZ] " bluez.test.bot
2025-01-23 18:40 ` [PATCH BlueZ] " patchwork-bot+bluetooth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox