aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/user/elf.c
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2015-03-10 17:18:13 +0100
committerAlex Auvolat <alex@adnab.me>2015-03-10 17:18:13 +0100
commitef50c1c0de9e992db9144571e7f08e5badbb9720 (patch)
tree26c34719e0a93e6f1831aaf14efdb436bc4b9077 /src/kernel/user/elf.c
parent1b9ea946b8ec8c71a2bad9a7b2ce253145dcd97c (diff)
downloadkogata-ef50c1c0de9e992db9144571e7f08e5badbb9720.tar.gz
kogata-ef50c1c0de9e992db9144571e7f08e5badbb9720.zip
Add mk_shm syscall ; replace get_mode by fctl.
Diffstat (limited to 'src/kernel/user/elf.c')
-rw-r--r--src/kernel/user/elf.c2
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;