diff options
author | Ian Moffett <ian@osmora.org> | 2024-05-01 22:10:32 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2024-05-01 22:10:32 -0400 |
commit | f14a6be0eb19a6f47fa4c8ae9c4df9b82a158642 (patch) | |
tree | 3dca765ab09d15688d014913128a38f13409f7b6 /sys | |
parent | 51ad0de583015668df07b278ea4a8076e774b219 (diff) |
kernel: vm_map: Refactor mmap()
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys')
-rw-r--r-- | sys/vm/vm_map.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index 9e40e95..afe6760 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -387,9 +387,7 @@ mmap(void *addr, size_t len, int prot, int flags, int fildes, off_t off) mapping->vmobj = vmobj; mapping->physmem_base = 0; - } - - if (addr == NULL && physmem != 0) { + } else if (addr == NULL && physmem != 0) { map_start = physmem + mapoff; vm_map((void *)map_start, physmem, prot, len); addr = (void *)physmem; |