From b5b41fd97bce7255c45629d435d4d752d225874a Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Wed, 10 Jan 2024 18:59:14 -0500 Subject: kernel: syslog: Add KWARN() Add macro to facilitate kernel warning logs Signed-off-by: Ian Moffett --- sys/include/sys/syslog.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/include/sys/syslog.h b/sys/include/sys/syslog.h index 344ba0f..7706eec 100644 --- a/sys/include/sys/syslog.h +++ b/sys/include/sys/syslog.h @@ -42,6 +42,10 @@ kprintf("%s[info]: ", __THIS_MODULE); \ kprintf(__VA_ARGS__); +#define KWARN(...) \ + kprintf("%s[WARN]: ", __THIS_MODULE); \ + kprintf(__VA_ARGS__); + #define KDEBUG(...) \ kprintf("%s[debug]: ", __THIS_MODULE); \ kprintf(__VA_ARGS__); -- cgit v1.2.3