mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 05:38:11 +00:00
Have Console::write() directly call vga_putch.
This commit is contained in:
parent
a70bfb87d5
commit
fc88368582
5 changed files with 18 additions and 23 deletions
|
@ -25,16 +25,18 @@ ssize_t Console::read(byte* buffer, size_t bufferSize)
|
|||
return 0;
|
||||
}
|
||||
|
||||
extern int kprintfFromConsole(const char*, ...);
|
||||
void Console::putChar(char ch)
|
||||
{
|
||||
vga_putch(nullptr, ch);
|
||||
}
|
||||
|
||||
ssize_t Console::write(const byte* data, size_t size)
|
||||
{
|
||||
if (!size)
|
||||
return 0;
|
||||
|
||||
for (size_t i = 0; i < size; ++i) {
|
||||
kprintfFromConsole("%c", data[i]);
|
||||
}
|
||||
for (size_t i = 0; i < size; ++i)
|
||||
putChar(data[i]);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue