diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-01-15 09:17:22 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-01-15 09:17:22 +0100 |
commit | e452303c664c3facfebe39539da0d796029bc603 (patch) | |
tree | 3e2ac04f858d480843606b3000cc4e5e7ac57c09 /Kernel/FIFO.cpp | |
parent | 49b63281a09b61ab608f51a771f124f14c1ee1ad (diff) | |
download | serenity-e452303c664c3facfebe39539da0d796029bc603.zip |
Allow character devices to block write attempts until there is more space.
Diffstat (limited to 'Kernel/FIFO.cpp')
-rw-r--r-- | Kernel/FIFO.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/FIFO.cpp b/Kernel/FIFO.cpp index 9b65dc132b..2fbe23286c 100644 --- a/Kernel/FIFO.cpp +++ b/Kernel/FIFO.cpp @@ -51,7 +51,7 @@ bool FIFO::can_read() const bool FIFO::can_write() const { - return true; + return m_buffer.bytes_in_write_buffer() < 4096; } ssize_t FIFO::read(byte* buffer, size_t size) |