From 286016040c9c573b564f00ead4534dfc4dfe30d7 Mon Sep 17 00:00:00 2001 From: Max Wash Date: Sun, 29 Mar 2026 11:51:05 +0100 Subject: [PATCH] kernel: only show task name/id in log output if TRACE is enabled --- syscall/log.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/syscall/log.c b/syscall/log.c index 689ffe0..c7c2ab4 100644 --- a/syscall/log.c +++ b/syscall/log.c @@ -5,8 +5,12 @@ kern_status_t sys_kern_log(const char *s) { +#ifdef TRACE struct task *task = current_task(); struct thread *thread = current_thread(); printk("%s[%d.%d]: %s", task->t_name, task->t_id, thread->tr_id, s); +#else + printk("%s", s); +#endif return KERN_OK; }