From b773439aa15add7da13dba78cb51bf7ec8840c46 Mon Sep 17 00:00:00 2001 From: Max Wash Date: Sun, 31 May 2026 17:21:15 +0100 Subject: [PATCH] libc: io: temporarily switch stderr to line-buffered mode no-buffering isn't compatible with kern_log (used by bootstrap), as it automatically appends a newline to every string written. this will be switched back once kern_log isn't being used anymore. --- lib/libc/io/stdio/stderr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/libc/io/stdio/stderr.c b/lib/libc/io/stdio/stderr.c index 2fce06c..0cbd38f 100644 --- a/lib/libc/io/stdio/stderr.c +++ b/lib/libc/io/stdio/stderr.c @@ -5,7 +5,9 @@ static struct __opaque_file __stderr = { .f_fd = 2, .f_flags = FILE_STATIC, - .f_buffer_mode = _IONBF, + /* TODO change this back to _IONBF once we're no longer using kern_log() + * in bootstrap */ + .f_buffer_mode = _IOLBF, }; extern struct __opaque_file *__libc_file_stderr(void)