feature: heap command prints the status of the allocator
kprintf: change KERN_DEFAULT to 0
This commit is contained in:
@ -10,7 +10,7 @@ int print_int_base(int32_t number, const char *prefix, const char *base);
|
||||
static int get_level(const char *str)
|
||||
{
|
||||
if (!str || !isdigit(str[0]))
|
||||
return 8;
|
||||
return 0;
|
||||
return str[0] - '0';
|
||||
}
|
||||
|
||||
@ -42,9 +42,9 @@ int kvprintf(const char *restrict format, va_list ap)
|
||||
const char *start = format;
|
||||
int ret = 0;
|
||||
|
||||
int level = get_level(format);
|
||||
const int level = get_level(format);
|
||||
set_color_level(level);
|
||||
if (level != 8)
|
||||
if (level)
|
||||
start++;
|
||||
while (*start != '\0') {
|
||||
if (*start == '%' && *(start + 1) != '\0') {
|
||||
@ -55,7 +55,7 @@ int kvprintf(const char *restrict format, va_list ap)
|
||||
}
|
||||
start++;
|
||||
}
|
||||
set_color_level(8);
|
||||
set_color_level(0);
|
||||
update_cursor();
|
||||
return ret;
|
||||
}
|
||||
|
Reference in New Issue
Block a user