mirror of
https://github.com/RGBCube/serenity
synced 2025-06-22 14:12:10 +00:00
Kernel: Add KBuffer::bytes() and use it
(Instead of hand-wrapping { data(), size() } in a bunch of places.)
This commit is contained in:
parent
bee2de4b31
commit
524ef5e475
7 changed files with 9 additions and 7 deletions
|
@ -27,7 +27,7 @@ KResultOr<FlatPtr> Process::sys$module_load(Userspace<const char*> user_path, si
|
|||
auto description = TRY(VirtualFileSystem::the().open(path->view(), O_RDONLY, 0, current_directory()));
|
||||
auto payload = TRY(description->read_entire_file());
|
||||
|
||||
auto storage = TRY(KBuffer::try_create_with_bytes(ReadonlyBytes { payload->data(), payload->size() }));
|
||||
auto storage = TRY(KBuffer::try_create_with_bytes(payload->bytes()));
|
||||
|
||||
auto elf_image = try_make<ELF::Image>(storage->data(), storage->size());
|
||||
if (!elf_image)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue