1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 12:48:10 +00:00

Kernel: Add convenience values to the Memory::Region::Access enum

Instead of `Memory::Region::Access::Read | Memory::Region::AccessWrite`
you can now say `Memory::Region::Access::ReadWrite`.
This commit is contained in:
Andreas Kling 2021-08-06 22:25:00 +02:00
parent 47bdd7c3a0
commit 2cd8b21974
38 changed files with 68 additions and 65 deletions

View file

@ -55,7 +55,7 @@ KResultOr<FlatPtr> Process::sys$module_load(Userspace<const char*> user_path, si
elf_image->for_each_section_of_type(SHT_PROGBITS, [&](const ELF::Image::Section& section) {
if (!section.size())
return;
auto section_storage = KBuffer::copy(section.raw_data(), section.size(), Memory::Region::Access::Read | Memory::Region::Access::Write | Memory::Region::Access::Execute);
auto section_storage = KBuffer::copy(section.raw_data(), section.size(), Memory::Region::Access::ReadWriteExecute);
section_storage_by_name.set(section.name(), section_storage.data());
module->sections.append(move(section_storage));
});