1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 13:17:44 +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:
Andreas Kling 2019-05-30 12:38:35 +02:00
parent 004a630bfe
commit 66c1a9be3b
7 changed files with 11 additions and 9 deletions

View file

@ -18,7 +18,7 @@ public:
void set_y_offset(int);
virtual int ioctl(FileDescriptor&, unsigned request, unsigned arg) override;
virtual KResultOr<Region*> mmap(Process&, LinearAddress preferred_laddr, size_t offset, size_t) override;
virtual KResultOr<Region*> mmap(Process&, LinearAddress preferred_laddr, size_t offset, size_t, int prot) override;
size_t framebuffer_size_in_bytes() const { return m_framebuffer_size.area() * sizeof(dword) * 2; }
Size framebuffer_size() const { return m_framebuffer_size; }