Kernel: Move KBufferBuilder to the fallible KBuffer API

KBufferBuilder::build() now returns an OwnPtr<KBuffer> and can fail.
Clients of the API have been updated to handle that situation.
This commit is contained in:
Andreas Kling 2020-12-18 14:10:10 +01:00
commit 8e79bde2b7
Notes: sideshowbarker 2024-07-19 00:45:11 +09:00
18 changed files with 121 additions and 100 deletions

View file

@ -67,7 +67,7 @@ public:
InodeIdentifier identifier() const { return { fsid(), index() }; }
virtual InodeMetadata metadata() const = 0;
KResultOr<KBuffer> read_entire(FileDescription* = nullptr) const;
KResultOr<NonnullOwnPtr<KBuffer>> read_entire(FileDescription* = nullptr) const;
virtual ssize_t read_bytes(off_t, ssize_t, UserOrKernelBuffer& buffer, FileDescription*) const = 0;
virtual KResult traverse_as_directory(Function<bool(const FS::DirectoryEntryView&)>) const = 0;