mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-07 17:15:26 +00:00
Kernel: Use ErrorOr in BlockBased and Ext2 filesystem raw read and write
These functions used to return booleans which withheld useful error information for callers. Internally they would suppress and convert Error objects. We now log or propagate these errors up the stack.
This commit is contained in:
@@ -29,11 +29,11 @@ protected:
|
||||
ErrorOr<void> read_block(BlockIndex, UserOrKernelBuffer*, size_t count, size_t offset = 0, bool allow_cache = true) const;
|
||||
ErrorOr<void> read_blocks(BlockIndex, unsigned count, UserOrKernelBuffer&, bool allow_cache = true) const;
|
||||
|
||||
bool raw_read(BlockIndex, UserOrKernelBuffer&);
|
||||
bool raw_write(BlockIndex, const UserOrKernelBuffer&);
|
||||
ErrorOr<void> raw_read(BlockIndex, UserOrKernelBuffer&);
|
||||
ErrorOr<void> raw_write(BlockIndex, const UserOrKernelBuffer&);
|
||||
|
||||
bool raw_read_blocks(BlockIndex index, size_t count, UserOrKernelBuffer&);
|
||||
bool raw_write_blocks(BlockIndex index, size_t count, const UserOrKernelBuffer&);
|
||||
ErrorOr<void> raw_read_blocks(BlockIndex index, size_t count, UserOrKernelBuffer&);
|
||||
ErrorOr<void> raw_write_blocks(BlockIndex index, size_t count, const UserOrKernelBuffer&);
|
||||
|
||||
ErrorOr<void> write_block(BlockIndex, const UserOrKernelBuffer&, size_t count, size_t offset = 0, bool allow_cache = true);
|
||||
ErrorOr<void> write_blocks(BlockIndex, unsigned count, const UserOrKernelBuffer&, bool allow_cache = true);
|
||||
|
||||
Reference in New Issue
Block a user