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

@ -25,25 +25,11 @@ void kernel_main(void)
terminal_initialize();
init_gdt();
init_memory();
char *str = kalloc_frame(104831);
str = kalloc_frame(104831);
str = kalloc_frame(104831);
str = kalloc_frame(104831);
str = kalloc_frame(104831);
str = kalloc_frame(104831);
str = kalloc_frame(104831);
str = kalloc_frame(104831);
str = kalloc_frame(104831);
str = kalloc_frame(104831);
kfree_frame(str, 104831);
str = kalloc_frame(104831);
kfree_frame(str, 104831);
str = kalloc_frame(104831);
kfree_frame(str, 104831);
str = kalloc_frame(104831);
kfree_frame(str, 104831);
str = kalloc_frame(104831);
memcpy(str, "Hello world!\n", 15);
kprintf(KERN_INFO, "%d: %s", str, str);
kprintf(KERN_CRIT "KERN_CRIT\n");
kprintf(KERN_ALERT "KERN_ALERT\n");
kprintf(KERN_WARNING "KERN_WARNING\n");
kprintf(KERN_NOTICE "KERN_NOTICE\n");
kprintf(KERN_INFO "KERN_INFO\n");
kprintf(KERN_DEBUG "KERN_DEBUG\n");
shell_init();
}