diff options
author | Jean-Baptiste Boric <jblbeurope@gmail.com> | 2021-03-18 22:57:25 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-03-19 09:15:19 +0100 |
commit | 6698fd84fff34f9fb2dec78c20519b5c89b2c8f9 (patch) | |
tree | 67631de5cb5b4a950d8bb9a244bf446e674ce151 /Kernel/Syscalls | |
parent | 0d8c9024eec12d57270cca1cf6bfc7d03c0ca229 (diff) | |
download | serenity-6698fd84fff34f9fb2dec78c20519b5c89b2c8f9.zip |
Kernel: Refactor storage stack with u64 as mmap offset
Diffstat (limited to 'Kernel/Syscalls')
-rw-r--r-- | Kernel/Syscalls/mmap.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Kernel/Syscalls/mmap.cpp b/Kernel/Syscalls/mmap.cpp index 68447db9f2..d818701629 100644 --- a/Kernel/Syscalls/mmap.cpp +++ b/Kernel/Syscalls/mmap.cpp @@ -148,12 +148,12 @@ KResultOr<FlatPtr> Process::sys$mmap(Userspace<const Syscall::SC_mmap_params*> u return EFAULT; FlatPtr addr = params.addr; - size_t size = params.size; - size_t alignment = params.alignment; - int prot = params.prot; - int flags = params.flags; - int fd = params.fd; - int offset = params.offset; + auto size = params.size; + auto alignment = params.alignment; + auto prot = params.prot; + auto flags = params.flags; + auto fd = params.fd; + auto offset = params.offset; if (prot & PROT_EXEC) { REQUIRE_PROMISE(prot_exec); @@ -255,7 +255,7 @@ KResultOr<FlatPtr> Process::sys$mmap(Userspace<const Syscall::SC_mmap_params*> u return EACCES; } - auto region_or_error = description->mmap(*this, range.value(), static_cast<size_t>(offset), prot, map_shared); + auto region_or_error = description->mmap(*this, range.value(), static_cast<u64>(offset), prot, map_shared); if (region_or_error.is_error()) return region_or_error.error().error(); region = region_or_error.value(); |