mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 04:39:06 +00:00
Kernel: Plumb KResult through FileDescription::read_entire_file() implementation.
Allow file system implementation to return meaningful error codes to callers of the FileDescription::read_entire_file(). This allows both Process::sys$readlink() and Process::sys$module_load() to return more detailed errors to the user.
This commit is contained in:
parent
c459e4ecb2
commit
6a74af8063
Notes:
sideshowbarker
2024-07-19 06:08:22 +09:00
Author: https://github.com/bgianfo
Commit: 6a74af8063
Pull-request: https://github.com/SerenityOS/serenity/pull/2385
14 changed files with 54 additions and 36 deletions
|
@ -158,7 +158,7 @@ bool FileDescription::can_read() const
|
|||
return m_file->can_read(*this, offset());
|
||||
}
|
||||
|
||||
ByteBuffer FileDescription::read_entire_file()
|
||||
KResultOr<ByteBuffer> FileDescription::read_entire_file()
|
||||
{
|
||||
// HACK ALERT: (This entire function)
|
||||
ASSERT(m_file->is_inode());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue