mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-07 08:39:22 +00:00
LibCore: Return EBADF
on unsupported stream operations
This commit is contained in:
parent
e65767c2e7
commit
1ca62de558
Notes:
sideshowbarker
2024-07-17 01:31:54 +09:00
Author: https://github.com/timschumi
Commit: 1ca62de558
Pull-request: https://github.com/SerenityOS/serenity/pull/17058
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/gmta ✅
6 changed files with 9 additions and 8 deletions
|
@ -729,7 +729,7 @@ ErrorOr<void> WrappedAKInputStream::discard(size_t discarded_bytes)
|
|||
|
||||
ErrorOr<size_t> WrappedAKInputStream::write(ReadonlyBytes)
|
||||
{
|
||||
VERIFY_NOT_REACHED();
|
||||
return Error::from_errno(EBADF);
|
||||
}
|
||||
|
||||
bool WrappedAKInputStream::is_eof() const
|
||||
|
@ -753,7 +753,7 @@ WrappedAKOutputStream::WrappedAKOutputStream(NonnullOwnPtr<OutputStream> stream)
|
|||
|
||||
ErrorOr<Bytes> WrappedAKOutputStream::read(Bytes)
|
||||
{
|
||||
VERIFY_NOT_REACHED();
|
||||
return Error::from_errno(EBADF);
|
||||
}
|
||||
|
||||
ErrorOr<size_t> WrappedAKOutputStream::write(ReadonlyBytes bytes)
|
||||
|
@ -768,7 +768,7 @@ ErrorOr<size_t> WrappedAKOutputStream::write(ReadonlyBytes bytes)
|
|||
|
||||
bool WrappedAKOutputStream::is_eof() const
|
||||
{
|
||||
VERIFY_NOT_REACHED();
|
||||
return true;
|
||||
}
|
||||
|
||||
bool WrappedAKOutputStream::is_open() const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue