diff --git a/kernel/src/video/TextConsole.cpp b/kernel/src/video/TextConsole.cpp index 09436fbf..dfb9b440 100644 --- a/kernel/src/video/TextConsole.cpp +++ b/kernel/src/video/TextConsole.cpp @@ -172,6 +172,12 @@ namespace TextConsole return {}; } + Result write(const char* str, usize len) + { + while (len--) TRY(putchar(*str++)); + return {}; + } + void wprint(const wchar_t* str) { while (*str) putwchar(*str++); diff --git a/kernel/src/video/TextConsole.h b/kernel/src/video/TextConsole.h index c700b138..6db8fe88 100644 --- a/kernel/src/video/TextConsole.h +++ b/kernel/src/video/TextConsole.h @@ -14,6 +14,7 @@ namespace TextConsole u32 background(); void move_to(u32 x, u32 y); Result print(const char* str); + Result write(const char* str, usize len); void wprint(const wchar_t* str); Result println(const char* str); void wprintln(const wchar_t* str);