From 46007d2598b7aef13895b21669cfb6f24272e5fe Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Mon, 27 Apr 2020 23:13:36 +0200 Subject: Minor but important fixes in processing --- src/kernel/fs/elf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/kernel/fs/elf.c') diff --git a/src/kernel/fs/elf.c b/src/kernel/fs/elf.c index aea191b..ec22d77 100644 --- a/src/kernel/fs/elf.c +++ b/src/kernel/fs/elf.c @@ -33,7 +33,8 @@ struct process *elf_load(char *path) struct elf_program_header *program_header = (void *)header + header->phoff; if (!is_elf(header)) { - panic("File not valid"); + warn("File not valid: %s", path); + return NULL; } else { debug("File is valid: %s", path); } @@ -53,7 +54,6 @@ struct process *elf_load(char *path) case 0: break; case 1: - i += 0; debug("Allocating space for ELF binary section..."); uint32_t loc = (uint32_t)kmalloc_a(PAGE_S); paging_map_user(proc->cr3, loc, program_header->vaddr); -- cgit v1.2.3