mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:47:45 +00:00
Kernel+UE+LibC: Store address as void* in SC_m{re,}map_params
Most other syscalls pass address arguments as `void*` instead of `uintptr_t`, so let's do that here too. Besides improving consistency, this commit makes `strace` correctly pretty-print these arguments in hex.
This commit is contained in:
parent
d1ef8e63f7
commit
8e3d1a42e3
5 changed files with 8 additions and 8 deletions
|
@ -151,7 +151,7 @@ ErrorOr<int> fcntl(int fd, int command, ...)
|
|||
ErrorOr<void*> mmap(void* address, size_t size, int protection, int flags, int fd, off_t offset, [[maybe_unused]] size_t alignment, [[maybe_unused]] StringView name)
|
||||
{
|
||||
#ifdef __serenity__
|
||||
Syscall::SC_mmap_params params { (uintptr_t)address, size, alignment, protection, flags, fd, offset, { name.characters_without_null_termination(), name.length() } };
|
||||
Syscall::SC_mmap_params params { address, size, alignment, protection, flags, fd, offset, { name.characters_without_null_termination(), name.length() } };
|
||||
ptrdiff_t rc = syscall(SC_mmap, ¶ms);
|
||||
if (rc < 0 && rc > -EMAXERRNO)
|
||||
return Error::from_syscall("mmap"sv, rc);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue