diff options
Diffstat (limited to 'src/kernel/syscall/syscall.c')
-rw-r--r-- | src/kernel/syscall/syscall.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/kernel/syscall/syscall.c b/src/kernel/syscall/syscall.c index 24f2445..16d1ce4 100644 --- a/src/kernel/syscall/syscall.c +++ b/src/kernel/syscall/syscall.c @@ -11,7 +11,7 @@ uint32_t (*syscalls[])() = { [0] = (uint32_t (*)()) halt_loop, // DEBUG! [1] = sys_write, [2] = sys_read, - [3] = sys_writec, + [3] = (uint32_t (*)()) sys_writec, [4] = sys_readc, [5] = sys_get_pointers, [6] = sys_paging_alloc, @@ -29,7 +29,8 @@ void syscall_handler(struct regs *r) if (!location) return; - location(r->ebx, r->ecx, r->edx, r->esi, r->edi); + uint32_t ret = location(r->ebx, r->ecx, r->edx, r->esi, r->edi); + r->eax = ret; } void syscalls_install() |