diff options
-rw-r--r-- | Libraries/LibBareMetal/Output/kprintf.cpp | 14 | ||||
-rw-r--r-- | Libraries/LibBareMetal/Output/kstdio.h | 1 |
2 files changed, 14 insertions, 1 deletions
diff --git a/Libraries/LibBareMetal/Output/kprintf.cpp b/Libraries/LibBareMetal/Output/kprintf.cpp index e1a6f9ae3b..f064b49fd0 100644 --- a/Libraries/LibBareMetal/Output/kprintf.cpp +++ b/Libraries/LibBareMetal/Output/kprintf.cpp @@ -96,7 +96,7 @@ static void serial_putch(char ch) was_cr = false; } -static void console_putch(char*&, char ch) +static void console_out(char ch) { if (serial_debug) serial_putch(ch); @@ -110,6 +110,11 @@ static void console_putch(char*&, char ch) } } +static void console_putch(char*&, char ch) +{ + console_out(ch); +} + int kprintf(const char* fmt, ...) { color_on(); @@ -155,6 +160,13 @@ extern "C" int dbgputstr(const char* characters, int length) return 0; } +extern "C" int kernelputstr(const char* characters, int length) +{ + for (int i = 0; i < length; ++i) + console_out(characters[i]); + return 0; +} + extern "C" int dbgprintf(const char* fmt, ...) { color_on(); diff --git a/Libraries/LibBareMetal/Output/kstdio.h b/Libraries/LibBareMetal/Output/kstdio.h index e5e0b2c1ae..2aa8355029 100644 --- a/Libraries/LibBareMetal/Output/kstdio.h +++ b/Libraries/LibBareMetal/Output/kstdio.h @@ -31,6 +31,7 @@ extern "C" { int dbgprintf(const char* fmt, ...); int dbgputstr(const char*, int); +int kernelputstr(const char*, int); int kprintf(const char* fmt, ...); int sprintf(char* buf, const char* fmt, ...); void set_serial_debug(bool on_or_off); |