diff options
author | David Briggs <david@dpbriggs.ca> | 2022-01-22 19:53:02 -0500 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-01-23 14:36:01 +0000 |
commit | cf45370c4784edd8f0dadc2a1728902629681410 (patch) | |
tree | 99f5c7b7852d19915620e9b7c749c56e48ee4702 /Kernel/FileSystem/BlockBasedFileSystem.h | |
parent | df6b9cdb0c5eb8d5108d919634846fb63464d1a5 (diff) | |
download | serenity-cf45370c4784edd8f0dadc2a1728902629681410.zip |
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.
Diffstat (limited to 'Kernel/FileSystem/BlockBasedFileSystem.h')
-rw-r--r-- | Kernel/FileSystem/BlockBasedFileSystem.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Kernel/FileSystem/BlockBasedFileSystem.h b/Kernel/FileSystem/BlockBasedFileSystem.h index cc0008dd64..f1cfa29818 100644 --- a/Kernel/FileSystem/BlockBasedFileSystem.h +++ b/Kernel/FileSystem/BlockBasedFileSystem.h @@ -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); |