aboutsummaryrefslogtreecommitdiff
path: root/kernel/features/load.c
diff options
context:
space:
mode:
authorMarvin Borner2021-03-21 12:40:41 +0100
committerMarvin Borner2021-03-21 12:46:08 +0100
commit09c3bdb186868204cb03d457244e05e12eb685d6 (patch)
tree7bf59794173d700df08ad303acd6c5a49193a9eb /kernel/features/load.c
parent68a0ad7f21ba07b93cd63613996e27afd8780f9c (diff)
Hardened syscalls
Diffstat (limited to 'kernel/features/load.c')
-rw-r--r--kernel/features/load.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/features/load.c b/kernel/features/load.c
index 1795efb..b8640c1 100644
--- a/kernel/features/load.c
+++ b/kernel/features/load.c
@@ -9,21 +9,21 @@
#define PROC_STACK_SIZE 0x4000
-s32 elf_load(const char *path, struct proc *proc)
+res elf_load(const char *path, struct proc *proc)
{
if (!path || !memory_valid(path) || !proc)
return -EFAULT;
struct stat s = { 0 };
memory_bypass_enable();
- s32 stat = vfs_stat(path, &s);
+ res stat = vfs_stat(path, &s);
memory_bypass_disable();
if (stat != 0)
return stat;
struct elf_header header = { 0 };
memory_bypass_enable();
- s32 read = vfs_read(path, &header, 0, sizeof(header));
+ res read = vfs_read(path, &header, 0, sizeof(header));
memory_bypass_disable();
if (read < 0)
return read;