From ef50c1c0de9e992db9144571e7f08e5badbb9720 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Tue, 10 Mar 2015 17:18:13 +0100 Subject: Add mk_shm syscall ; replace get_mode by fctl. --- src/kernel/user/elf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/kernel/user/elf.c') 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; -- cgit v1.2.3