aboutsummaryrefslogtreecommitdiff
path: root/kernel/features/syscall.c
diff options
context:
space:
mode:
authorMarvin Borner2020-08-16 15:35:43 +0200
committerMarvin Borner2020-08-16 15:35:43 +0200
commit36e36fae364dec02999f58edbe997780d901b674 (patch)
tree8b06909e475ef84201ca2ef9375880249b1d5e68 /kernel/features/syscall.c
parentc4a0bc2571162ad83fc51eb823f1c535336041bf (diff)
Added WM and exec parameters
Diffstat (limited to 'kernel/features/syscall.c')
-rw-r--r--kernel/features/syscall.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/features/syscall.c b/kernel/features/syscall.c
index b486deb..e6bcb83 100644
--- a/kernel/features/syscall.c
+++ b/kernel/features/syscall.c
@@ -39,6 +39,10 @@ void syscall_handler(struct regs *r)
case SYS_EXEC: {
char *path = (char *)r->ebx;
struct proc *proc = proc_make();
+ ((u32 *)proc->regs.esp)[0] = r->ecx;
+ ((u32 *)proc->regs.esp)[1] = r->edx;
+ ((u32 *)proc->regs.esp)[2] = r->esi;
+ ((u32 *)proc->regs.esp)[3] = r->edi;
r->eax = bin_load(path, proc);
break;
}