From cf45370c4784edd8f0dadc2a1728902629681410 Mon Sep 17 00:00:00 2001 From: David Briggs Date: Sat, 22 Jan 2022 19:53:02 -0500 Subject: 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. --- Kernel/FileSystem/BlockBasedFileSystem.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Kernel/FileSystem/BlockBasedFileSystem.h') 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 read_block(BlockIndex, UserOrKernelBuffer*, size_t count, size_t offset = 0, bool allow_cache = true) const; ErrorOr read_blocks(BlockIndex, unsigned count, UserOrKernelBuffer&, bool allow_cache = true) const; - bool raw_read(BlockIndex, UserOrKernelBuffer&); - bool raw_write(BlockIndex, const UserOrKernelBuffer&); + ErrorOr raw_read(BlockIndex, UserOrKernelBuffer&); + ErrorOr 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 raw_read_blocks(BlockIndex index, size_t count, UserOrKernelBuffer&); + ErrorOr raw_write_blocks(BlockIndex index, size_t count, const UserOrKernelBuffer&); ErrorOr write_block(BlockIndex, const UserOrKernelBuffer&, size_t count, size_t offset = 0, bool allow_cache = true); ErrorOr write_blocks(BlockIndex, unsigned count, const UserOrKernelBuffer&, bool allow_cache = true); -- cgit v1.2.3