aboutsummaryrefslogtreecommitdiff
path: root/kernel/features/load.c
diff options
context:
space:
mode:
authorMarvin Borner2021-03-20 19:52:56 +0100
committerMarvin Borner2021-03-20 19:52:56 +0100
commitb96c27bba0b242fc860fc9a2fcb63f121312fa7e (patch)
tree0febf9d97020f131055ee41fe6d8b8bd6593045a /kernel/features/load.c
parent635751fc2a75f66d1541469b3204efb1701bd91c (diff)
LGTM!
Diffstat (limited to 'kernel/features/load.c')
-rw-r--r--kernel/features/load.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/kernel/features/load.c b/kernel/features/load.c
index d3f3495..3430a75 100644
--- a/kernel/features/load.c
+++ b/kernel/features/load.c
@@ -104,9 +104,8 @@ s32 elf_load(const char *path, struct proc *proc)
struct memory_range prange = physical_alloc(vrange.size);
virtual_map(proc->page_dir, prange, vrange.base, MEMORY_CLEAR | MEMORY_USER);
- if ((u32)vfs_read(path, (void *)program.vaddr, program.offset, program.filesz) !=
- program.filesz) {
- print("OH NOSE!\n");
+ if ((u32)vfs_read(proc->name, (void *)program.vaddr, program.offset,
+ program.filesz) != program.filesz) {
memory_switch_dir(prev);
return -ENOEXEC;
}