mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:48:12 +00:00
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:
parent
d936d86332
commit
8e79bde2b7
18 changed files with 121 additions and 100 deletions
|
@ -73,7 +73,7 @@ public:
|
|||
|
||||
ssize_t get_dir_entries(UserOrKernelBuffer& buffer, ssize_t);
|
||||
|
||||
KResultOr<KBuffer> read_entire_file();
|
||||
KResultOr<NonnullOwnPtr<KBuffer>> read_entire_file();
|
||||
|
||||
String absolute_path() const;
|
||||
|
||||
|
@ -122,7 +122,7 @@ public:
|
|||
FIFO::Direction fifo_direction() { return m_fifo_direction; }
|
||||
void set_fifo_direction(Badge<FIFO>, FIFO::Direction direction) { m_fifo_direction = direction; }
|
||||
|
||||
Optional<KBuffer>& generator_cache() { return m_generator_cache; }
|
||||
OwnPtr<KBuffer>& generator_cache() { return m_generator_cache; }
|
||||
|
||||
void set_original_inode(Badge<VFS>, NonnullRefPtr<Inode>&& inode) { m_inode = move(inode); }
|
||||
|
||||
|
@ -150,7 +150,7 @@ private:
|
|||
|
||||
off_t m_current_offset { 0 };
|
||||
|
||||
Optional<KBuffer> m_generator_cache;
|
||||
OwnPtr<KBuffer> m_generator_cache;
|
||||
|
||||
u32 m_file_flags { 0 };
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue