X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/1eeed1150149b63d6e49e033697454bc12b533b9..6b995c8cb722d10aaacba52999f5c43e43daeb85:/lunaix-os/includes/lunaix/syslog.h diff --git a/lunaix-os/includes/lunaix/syslog.h b/lunaix-os/includes/lunaix/syslog.h index 423823c..3b827f6 100644 --- a/lunaix-os/includes/lunaix/syslog.h +++ b/lunaix-os/includes/lunaix/syslog.h @@ -2,6 +2,7 @@ #define __LUNAIX_SYSLOG_H #include +#include #include #define KLOG_DEBUG 0 @@ -28,6 +29,8 @@ va_end(args); \ } +#define printk(fmt, ...) kprintf_v(__FILE__, fmt, ##__VA_ARGS__) + #define DEBUG(fmt, ...) kprintf(KDEBUG fmt, ##__VA_ARGS__) #define INFO(fmt, ...) kprintf(KINFO fmt, ##__VA_ARGS__) #define WARN(fmt, ...) kprintf(KWARN fmt, ##__VA_ARGS__) @@ -35,9 +38,12 @@ #define FATAL(fmt, ...) \ ({ \ kprintf(KFATAL fmt, ##__VA_ARGS__); \ - spin(); \ + fail(fmt); \ }) void kprintf_m(const char* component, const char* fmt, va_list args); + +void +kprintf_v(const char* component, const char* fmt, ...); #endif /* __LUNAIX_SYSLOG_H */