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

@ -53,7 +53,7 @@ int Process::sys$module_load(Userspace<const char*> user_path, size_t path_lengt
if (payload_or_error.is_error())
return payload_or_error.error();
auto payload = payload_or_error.value();
auto& payload = *payload_or_error.value();
auto storage = KBuffer::create_with_size(payload.size());
memcpy(storage.data(), payload.data(), payload.size());