diff options
Diffstat (limited to 'src/kernel/user/elf.c')
-rw-r--r-- | src/kernel/user/elf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/kernel/user/elf.c b/src/kernel/user/elf.c index ed9d3c4..2fcc915 100644 --- a/src/kernel/user/elf.c +++ b/src/kernel/user/elf.c @@ -34,7 +34,7 @@ proc_entry_t elf_load(fs_handle_t *f, process_t* process) { if (read_phdr_r != sizeof(elf_phdr_t)) goto error; if (phdr.p_type == PT_LOAD) { - if ((phdr.p_flags & PF_W) || !(file_get_mode(f) & FM_MMAP)) { + if ((phdr.p_flags & PF_W) || !(f->mode & FM_MMAP)) { bool mmap_ok = mmap(process, (void*)phdr.p_vaddr, phdr.p_memsz, ((phdr.p_flags & PF_R) ? MM_READ : 0) | MM_WRITE); if (!mmap_ok) goto error; |