mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:47:36 +00:00
LibBareMetal: Add support for kernel log stream
This commit is contained in:
parent
214f934465
commit
dc01a71fac
2 changed files with 14 additions and 1 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue