feature: log level on kprintf (color)

fix: kprintf now uses concatenated strings for the flag
This commit is contained in:
2024-09-20 12:40:36 +02:00
parent 4cc1dba5f9
commit 2e41858c77
13 changed files with 99 additions and 81 deletions

View File

@ -2,18 +2,15 @@
#include <stdarg.h>
enum print_level {
KERN_EMERG,
KERN_ALERT,
KERN_CRIT,
KERN_ERR,
KERN_WARNING,
KERN_NOTICE,
KERN_INFO,
KERN_DEBUG,
KERN_DEFAULT,
KERN_CONT
};
#define KERN_EMERG "0"
#define KERN_ALERT "1"
#define KERN_CRIT "2"
#define KERN_ERR "3"
#define KERN_WARNING "4"
#define KERN_NOTICE "5"
#define KERN_INFO "6"
#define KERN_DEBUG "7"
#define KERN_DEFAULT "8"
int kprintf(int level, const char *restrict format, ...);
int kvprintf(int level, const char *restrict format, va_list ap);
int kprintf(const char *restrict format, ...);
int kvprintf(const char *restrict format, va_list ap);