From e4d84b5e7977230729cfcfb3563a391c96bafe61 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Wed, 17 Feb 2021 16:22:34 +0100 Subject: [PATCH] Kernel: Remove dbgprintf() from kernel There are no remaining users of this API in the kernel. --- Kernel/kprintf.cpp | 23 ----------------------- Kernel/kstdio.h | 1 - 2 files changed, 24 deletions(-) diff --git a/Kernel/kprintf.cpp b/Kernel/kprintf.cpp index 131e5946ea..ccdae4c2f7 100644 --- a/Kernel/kprintf.cpp +++ b/Kernel/kprintf.cpp @@ -183,11 +183,6 @@ static void debugger_out(char ch) IO::out8(0xe9, ch); } -static void debugger_putch(char*&, char ch) -{ - debugger_out(ch); -} - extern "C" int dbgputstr(const char* characters, int length) { if (!characters) @@ -207,21 +202,3 @@ extern "C" int kernelputstr(const char* characters, int length) console_out(characters[i]); return 0; } - -static int vdbgprintf(const char* fmt, va_list ap) -{ - ScopedSpinLock lock(s_log_lock); - color_on(); - int ret = printf_internal(debugger_putch, nullptr, fmt, ap); - color_off(); - return ret; -} - -extern "C" int dbgprintf(const char* fmt, ...) -{ - va_list ap; - va_start(ap, fmt); - int ret = vdbgprintf(fmt, ap); - va_end(ap); - return ret; -} diff --git a/Kernel/kstdio.h b/Kernel/kstdio.h index 1ab726d3f0..72a83d8102 100644 --- a/Kernel/kstdio.h +++ b/Kernel/kstdio.h @@ -29,7 +29,6 @@ #include extern "C" { -int dbgprintf(const char* fmt, ...) __attribute__((format(printf, 1, 2))); int dbgputstr(const char*, int); int kernelputstr(const char*, int); int kprintf(const char* fmt, ...) __attribute__((format(printf, 1, 2)));