mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-22 04:25:13 +00:00
LibBareMetal: Add support for kernel log stream
This commit is contained in:
parent
214f934465
commit
dc01a71fac
Notes:
sideshowbarker
2024-07-19 08:56:06 +09:00
Author: https://github.com/supercomputer7 Commit: https://github.com/SerenityOS/serenity/commit/dc01a71fac2 Pull-request: https://github.com/SerenityOS/serenity/pull/1322
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();
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue