summaryrefslogtreecommitdiff
path: root/Kernel/kprintf.cpp
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-07-21 21:43:37 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-07-21 21:43:37 +0200
commitaf81645a2a085ab6b6f44098d54231e48d575852 (patch)
tree59fee931c640f98eb4d615abaab641298f758949 /Kernel/kprintf.cpp
parent0ef13e60b01975f23b9597f378704d3e19644ad5 (diff)
downloadserenity-af81645a2a085ab6b6f44098d54231e48d575852.zip
Kernel+LibC: Add a dbgputstr() syscall for sending strings to debug output.
This is very handy for the DebugLogStream implementation, among others. :^)
Diffstat (limited to 'Kernel/kprintf.cpp')
-rw-r--r--Kernel/kprintf.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/Kernel/kprintf.cpp b/Kernel/kprintf.cpp
index 48a49d6b3e..468ce55ab7 100644
--- a/Kernel/kprintf.cpp
+++ b/Kernel/kprintf.cpp
@@ -57,12 +57,18 @@ int ksprintf(char* buffer, const char* fmt, ...)
return ret;
}
+extern "C" int dbgputstr(const char* characters, int length)
+{
+ for (int i = 0; i < length; ++i)
+ IO::out8(0xe9, characters[i]);
+ return 0;
+}
+
static void debugger_putch(char*&, char ch)
{
IO::out8(0xe9, ch);
}
-
extern "C" int dbgprintf(const char* fmt, ...)
{
color_on();