1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-16 18:35:07 +00:00

Kernel: SharedMemory should implement mmap().

This commit is contained in:
Andreas Kling 2019-05-18 04:17:53 +02:00
parent 237628a7a6
commit a4e48dce77
3 changed files with 8 additions and 6 deletions

View file

@ -324,12 +324,6 @@ KResultOr<Region*> FileDescriptor::mmap(Process& process, LinearAddress laddr, s
if (m_file)
return m_file->mmap(process, laddr, offset, size);
if (is_shared_memory()) {
if (!shared_memory()->vmo())
return KResult(-ENODEV);
return process.allocate_region_with_vmo(laddr, size, *shared_memory()->vmo(), offset, shared_memory()->name(), true, true);
}
if (!is_fsfile())
return KResult(-ENODEV);