shared/shell: add proper line clean to bt_shell_printf
PATCH 1/1 shared/shell: add proper line clean to bt_shell_printf
--- src/shared/shell.c | 1 + 1 file changed, 1 insertion(+)
src/shared/shell.c +1 -0
@@ -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 (); }
Signature · 1 line
2.45.2
Luiz Augusto von Dentz
maintainerHi Denis,
On Fri, Jan 17, 2025 at 1:08 PM Denis Burkov <[email protected]> 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?
Quoted 20 lines
--- src/shared/shell.c | 1 + 1 file changed, 1 insertion(+)src/shared/shell.c +1
-1@@ -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
Signature · 1 line
Luiz Augusto von Dentz
Quoted 7 lines · Luiz Augusto von Dentz
Hi Denis,
On Fri, Jan 17, 2025 at 1:08 PM Denis Burkov <[email protected]> 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)
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)
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
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 patch was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <[email protected]>:
Hello:
This patch was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <[email protected]>:
Quoted 3 lines · 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!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html