diff options
author | Marvin Borner | 2020-09-03 18:47:38 +0200 |
---|---|---|
committer | Marvin Borner | 2020-09-03 18:47:38 +0200 |
commit | 15a8cb8fa64b12d6c0b65eafb226971cd66dc3cd (patch) | |
tree | 10669f647c05299601497c277b2d4d4e89c4c9af /kernel/features/load.c | |
parent | d79b7492910d4a77b8c3a70f28c5ea4c81a0b2e5 (diff) |
Moved test to app
Diffstat (limited to 'kernel/features/load.c')
-rw-r--r-- | kernel/features/load.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/kernel/features/load.c b/kernel/features/load.c index d5dd839..2cbe2e7 100644 --- a/kernel/features/load.c +++ b/kernel/features/load.c @@ -12,8 +12,6 @@ int bin_load(char *path, struct proc *proc) { char *data = read_file(path); - if (!data) - return 1; u32 stack = (u32)malloc(0x2000) + 0x1000; @@ -21,7 +19,8 @@ int bin_load(char *path, struct proc *proc) proc->regs.useresp = (u32)stack; proc->regs.eip = (u32)data; strcpy(proc->name, path + 1); - return 0; + + return data ? 0 : 1; } int elf_verify(struct elf_header *h) |