Kernel: Fix `Pipe::can_read_impl()`

The logic was inversed, which made all select calls report incorrectly
for pipes. This made terminal emulator just freeze.
This commit is contained in:
Bananymous 2024-08-10 18:16:27 +03:00
parent 09a527fb12
commit bac3219a01
1 changed files with 1 additions and 1 deletions

View File

@ -34,7 +34,7 @@ namespace Kernel
virtual BAN::ErrorOr<size_t> read_impl(off_t, BAN::ByteSpan) override; virtual BAN::ErrorOr<size_t> read_impl(off_t, BAN::ByteSpan) override;
virtual BAN::ErrorOr<size_t> write_impl(off_t, BAN::ConstByteSpan) override; virtual BAN::ErrorOr<size_t> write_impl(off_t, BAN::ConstByteSpan) override;
virtual bool can_read_impl() const override { return m_buffer_size == 0; } virtual bool can_read_impl() const override { return m_buffer_size > 0; }
virtual bool can_write_impl() const override { return true; } virtual bool can_write_impl() const override { return true; }
virtual bool has_error_impl() const override { return false; } virtual bool has_error_impl() const override { return false; }