diff --git a/src/libc.c b/src/libc.c index 86fab7f..ea5f2c4 100644 --- a/src/libc.c +++ b/src/libc.c @@ -3,7 +3,7 @@ #include -#include +#include #include #include #include @@ -43,7 +43,7 @@ void my_abort() void my_exit(const int status) { logger_exit(status); - kernaux_drivers_shutdown_poweroff(); + drivers_shutdown_poweroff(); // TODO: libkernaux shutdown poweroff noreturn volatile int x = 0; diff --git a/src/logger.c b/src/logger.c index 0da8a7b..a5e4558 100644 --- a/src/logger.c +++ b/src/logger.c @@ -1,16 +1,16 @@ #include "logger.h" -#include +#include void logger_assert( const char *const file, const int line, const char *const str ) { - kernaux_drivers_console_printf("panic: %s:%u: \"%s\"\n", file, line, str); + drivers_console_printf("panic: %s:%u: \"%s\"\n", file, line, str); } void logger_exit(const int status) { - kernaux_drivers_console_printf("exit: %d\n", status); + drivers_console_printf("exit: %d\n", status); } diff --git a/src/main.c b/src/main.c index 38b0c5d..d51eea3 100644 --- a/src/main.c +++ b/src/main.c @@ -7,9 +7,10 @@ #include #include -#include #include +#include + #include #include #include @@ -93,6 +94,6 @@ mrb_value ruby_console_puts( ) { const char *str = NULL; mrb_get_args(mrb, "z", &str); - kernaux_drivers_console_puts(str); + drivers_console_puts(str); return mrb_nil_value(); } diff --git a/src/panic.c b/src/panic.c index b5c64cb..d4c5f1c 100644 --- a/src/panic.c +++ b/src/panic.c @@ -1,8 +1,8 @@ #include "logger.h" #include "panic.h" +#include #include -#include void panic_init() { @@ -12,5 +12,5 @@ void panic_init() void assert(const char *const file, const int line, const char *const str) { logger_assert(file, line, str); - kernaux_drivers_shutdown_poweroff(); + drivers_shutdown_poweroff(); } diff --git a/src/stack_trace.c b/src/stack_trace.c index a67f9db..dd2656a 100644 --- a/src/stack_trace.c +++ b/src/stack_trace.c @@ -2,7 +2,7 @@ #include -#include +#include #include #include @@ -34,7 +34,7 @@ void stack_trace_init( ); if (!elf_symbols_tag) { - kernaux_drivers_console_puts("ELF symbols tag not found"); + drivers_console_puts("ELF symbols tag not found"); return; } @@ -44,13 +44,13 @@ void stack_trace_init( // (const struct SectionEntry*)KERNAUX_MULTIBOOT2_DATA(elf_symbols_tag); (const struct SectionEntry*)(&((uint8_t*)elf_symbols_tag)[20]); - kernaux_drivers_console_puts("ELF symbols tag:"); + drivers_console_puts("ELF symbols tag:"); KernAux_Multiboot2_ITag_ELFSymbols_print( elf_symbols_tag, - kernaux_drivers_console_printf + drivers_console_printf ); - kernaux_drivers_console_printf(" data: 0x%p\n", (void*)section_headers); - kernaux_drivers_console_putc('\n'); + drivers_console_printf(" data: 0x%p\n", (void*)section_headers); + drivers_console_putc('\n'); const struct SectionEntry *const shstrtab = // FIXME: GRUB 2 doesn't conform the spec! @@ -71,8 +71,7 @@ void stack_trace_init( const char *const section_name = &((const char*)shstrtab->vaddr)[section_header->name]; - kernaux_drivers_console_printf("section %lu: %s\n", - index, section_name); + drivers_console_printf("section %lu: %s\n", index, section_name); if (strcmp(section_name, ".debug_info") == 0) { debug_info_index = index; @@ -83,12 +82,12 @@ void stack_trace_init( } } - kernaux_drivers_console_putc('\n'); + drivers_console_putc('\n'); - kernaux_drivers_console_printf(".debug_info: %lu\n", debug_info_index); - kernaux_drivers_console_printf(".debug_abbrev: %lu\n", debug_abbrev_index); - kernaux_drivers_console_printf(".debug_str: %lu\n", debug_str_index); - kernaux_drivers_console_putc('\n'); + drivers_console_printf(".debug_info: %lu\n", debug_info_index); + drivers_console_printf(".debug_abbrev: %lu\n", debug_abbrev_index); + drivers_console_printf(".debug_str: %lu\n", debug_str_index); + drivers_console_putc('\n'); if (!debug_info_index || !debug_abbrev_index || !debug_str_index) return; /* diff --git a/src/start.S b/src/start.S index 713cdd0..82b841a 100644 --- a/src/start.S +++ b/src/start.S @@ -22,6 +22,6 @@ _start: push %ebx // Multiboot information pointer push %eax // Multiboot magic number call main - call kernaux_drivers_shutdown_poweroff + call drivers_shutdown_poweroff .size _start, . - _start