From 025709e8643eb24e3360e575564b34ebd8062fd7 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Tue, 17 Dec 2019 21:50:02 +0100 Subject: Finally fixed text input syscalls! I guess I can officially call me dumb now as I just forgot to return the actual value from the syscall handler... --- src/kernel/syscall/syscall.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/kernel/syscall/syscall.c') 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() -- cgit v1.2.3