kernel: only show task name/id in log output if TRACE is enabled
This commit is contained in:
@@ -5,8 +5,12 @@
|
|||||||
|
|
||||||
kern_status_t sys_kern_log(const char *s)
|
kern_status_t sys_kern_log(const char *s)
|
||||||
{
|
{
|
||||||
|
#ifdef TRACE
|
||||||
struct task *task = current_task();
|
struct task *task = current_task();
|
||||||
struct thread *thread = current_thread();
|
struct thread *thread = current_thread();
|
||||||
printk("%s[%d.%d]: %s", task->t_name, task->t_id, thread->tr_id, s);
|
printk("%s[%d.%d]: %s", task->t_name, task->t_id, thread->tr_id, s);
|
||||||
|
#else
|
||||||
|
printk("%s", s);
|
||||||
|
#endif
|
||||||
return KERN_OK;
|
return KERN_OK;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user