summaryrefslogtreecommitdiff
path: root/sys/dev/video/fbdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/video/fbdev.c')
-rw-r--r--sys/dev/video/fbdev.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/dev/video/fbdev.c b/sys/dev/video/fbdev.c
index 391400c..b4b465b 100644
--- a/sys/dev/video/fbdev.c
+++ b/sys/dev/video/fbdev.c
@@ -45,13 +45,12 @@ static volatile struct limine_framebuffer_request framebuffer_req = {
};
static paddr_t
-fbdev_mmap(dev_t dev, off_t off, int flags)
+fbdev_mmap(dev_t dev, size_t size, off_t off, int flags)
{
size_t max_bounds;
max_bounds = FRAMEBUFFER->pitch * FRAMEBUFFER->height;
- max_bounds /= 4;
- if (off > max_bounds) {
+ if ((off + size) > max_bounds) {
return 0;
}