mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 22:25:07 +00:00
Kernel: Pass 'prot' argument to File::mmap() and act on it.
Nothing crazy, this just means that PROT_READ allocates readable regions, and that PROT_WRITE allocates writable ones.
This commit is contained in:
parent
004a630bfe
commit
66c1a9be3b
7 changed files with 11 additions and 9 deletions
|
@ -324,7 +324,7 @@ InodeMetadata FileDescriptor::metadata() const
|
|||
KResultOr<Region*> FileDescriptor::mmap(Process& process, LinearAddress laddr, size_t offset, size_t size, int prot)
|
||||
{
|
||||
if (m_file)
|
||||
return m_file->mmap(process, laddr, offset, size);
|
||||
return m_file->mmap(process, laddr, offset, size, prot);
|
||||
|
||||
if (!is_fsfile())
|
||||
return KResult(-ENODEV);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue