diff options
Diffstat (limited to 'Kernel/Console.cpp')
-rw-r--r-- | Kernel/Console.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/Kernel/Console.cpp b/Kernel/Console.cpp index 340c4d3fa8..d91d838425 100644 --- a/Kernel/Console.cpp +++ b/Kernel/Console.cpp @@ -57,14 +57,11 @@ Kernel::KResultOr<size_t> Console::write(FileDescription&, u64, const Kernel::Us if (!size) return 0; - ssize_t nread = data.read_buffered<256>(size, [&](const u8* bytes, size_t bytes_count) { + return data.read_buffered<256>(size, [&](u8 const* bytes, size_t bytes_count) { for (size_t i = 0; i < bytes_count; i++) put_char((char)bytes[i]); - return (ssize_t)bytes_count; + return bytes_count; }); - if (nread < 0) - return Kernel::KResult((ErrnoCode)-nread); - return (size_t)nread; } void Console::put_char(char ch) |