[PATCH 1/9] lib: term: avoid printing NUL with new new console_puts API

Ahmad Fatoum a.fatoum at barebox.org
Thu Apr 30 23:53:55 PDT 2026


sizeof(esc) includes the NUL terminator, which gets sent through
cdev->puts and may render as a glyph on the other side's terminal.

Use the new console_puts to avoid this.

Signed-off-by: Ahmad Fatoum <a.fatoum at barebox.org>
---
 lib/term.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/term.c b/lib/term.c
index 73a9904c2e1f..0aa4612d0b08 100644
--- a/lib/term.c
+++ b/lib/term.c
@@ -34,7 +34,7 @@ void term_getsize(int *screenwidth, int *screenheight)
 
 		memset(buf, 0, sizeof(buf));
 
-		cdev->puts(cdev, esc, sizeof(esc));
+		console_puts(cdev, esc);
 
 		n = 0;
 
-- 
2.47.3




More information about the barebox mailing list