1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 12:25:06 +00:00

Add some simple write buffering to LibC's stdio.

Plumb it all the way to the VirtualConsole. Also fix /bin/cat to write()
the whole chunks we get from read() directly to stdout.
This commit is contained in:
Andreas Kling 2018-11-08 01:23:23 +01:00
parent e287f8ef3a
commit da3857b0c2
10 changed files with 42 additions and 22 deletions

View file

@ -26,8 +26,7 @@ ssize_t TTY::read(byte* buffer, size_t size)
ssize_t TTY::write(const byte* buffer, size_t size)
{
for (size_t i = 0; i < size; ++i)
onTTYWrite(buffer[i]);
onTTYWrite(buffer, size);
return 0;
}