diff options
author | Andreas Kling <kling@serenityos.org> | 2021-02-17 16:33:43 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-02-17 16:33:43 +0100 |
commit | 5f610417d028d7d25169709cfc395aa673cbf78c (patch) | |
tree | 9ea4ffb554616476872765961b895d49fee046f0 | |
parent | 40e5210036a4dbc4ef32902769c79d77df782e8c (diff) | |
download | serenity-5f610417d028d7d25169709cfc395aa673cbf78c.zip |
Kernel: Remove kprintf()
There are no remaining users of this API.
-rw-r--r-- | Kernel/Arch/i386/Boot/boot.S | 7 | ||||
-rw-r--r-- | Kernel/kprintf.cpp | 34 | ||||
-rw-r--r-- | Kernel/kstdio.h | 1 |
3 files changed, 0 insertions, 42 deletions
diff --git a/Kernel/Arch/i386/Boot/boot.S b/Kernel/Arch/i386/Boot/boot.S index d0ced81de4..717b3fd00a 100644 --- a/Kernel/Arch/i386/Boot/boot.S +++ b/Kernel/Arch/i386/Boot/boot.S @@ -222,18 +222,11 @@ start: call init add $4, %esp - pushl $exit_message - call kprintf - add $4, %esp cli - loop: hlt jmp loop -exit_message: - .asciz "Kernel exited." - .extern init_ap .type init_ap, @function diff --git a/Kernel/kprintf.cpp b/Kernel/kprintf.cpp index ccdae4c2f7..e195a6ae43 100644 --- a/Kernel/kprintf.cpp +++ b/Kernel/kprintf.cpp @@ -49,23 +49,6 @@ int get_serial_debug() return serial_debug; } -static void color_on() -{ - IO::out8(0xe9, 0x1b); - IO::out8(0xe9, '['); - IO::out8(0xe9, '3'); - IO::out8(0xe9, '6'); - IO::out8(0xe9, 'm'); -} - -static void color_off() -{ - IO::out8(0xe9, 0x1b); - IO::out8(0xe9, '['); - IO::out8(0xe9, '0'); - IO::out8(0xe9, 'm'); -} - static void serial_putch(char ch) { static bool serial_ready = false; @@ -111,23 +94,6 @@ static void console_out(char ch) } } -static void console_putch(char*&, char ch) -{ - console_out(ch); -} - -int kprintf(const char* fmt, ...) -{ - ScopedSpinLock lock(s_log_lock); - color_on(); - va_list ap; - va_start(ap, fmt); - int ret = printf_internal(console_putch, nullptr, fmt, ap); - va_end(ap); - color_off(); - return ret; -} - static void buffer_putch(char*& bufptr, char ch) { *bufptr++ = ch; diff --git a/Kernel/kstdio.h b/Kernel/kstdio.h index 72a83d8102..067ba8edc0 100644 --- a/Kernel/kstdio.h +++ b/Kernel/kstdio.h @@ -31,7 +31,6 @@ extern "C" { int dbgputstr(const char*, int); int kernelputstr(const char*, int); -int kprintf(const char* fmt, ...) __attribute__((format(printf, 1, 2))); int snprintf(char* buf, size_t, const char* fmt, ...) __attribute__((format(printf, 3, 4))); void set_serial_debug(bool on_or_off); int get_serial_debug(); |