mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 10:48:41 +00:00
Kernel: Make the Process allocate_region* API's understand "int prot".
Instead of having to inspect 'prot' at every call site, make the Process API's take care of that so we can just pass it through.
This commit is contained in:
@@ -35,7 +35,7 @@ KResultOr<Region*> InodeFile::mmap(Process& process, LinearAddress preferred_lad
|
||||
region_name = "Memory-mapped file";
|
||||
#endif
|
||||
InterruptDisabler disabler;
|
||||
auto* region = process.allocate_file_backed_region(preferred_laddr, size, inode(), move(region_name), prot & PROT_READ, prot & PROT_WRITE);
|
||||
auto* region = process.allocate_file_backed_region(preferred_laddr, size, inode(), move(region_name), prot);
|
||||
if (!region)
|
||||
return KResult(-ENOMEM);
|
||||
return region;
|
||||
|
||||
Reference in New Issue
Block a user