diff options
Diffstat (limited to 'src/kernel/syscall/syscall.c')
-rw-r--r-- | src/kernel/syscall/syscall.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/kernel/syscall/syscall.c b/src/kernel/syscall/syscall.c index 0eac619..eb44c87 100644 --- a/src/kernel/syscall/syscall.c +++ b/src/kernel/syscall/syscall.c @@ -6,11 +6,14 @@ typedef uint32_t (*syscall_func)(unsigned int, ...); uint32_t (*syscalls[])() = { - [1] = sys_write + [1] = sys_write, + [2] = sys_read }; void syscall_handler(struct regs *r) { + serial_write("Received syscall!\n"); + if (r->eax >= sizeof(syscalls) / sizeof(*syscalls)) return; @@ -18,7 +21,6 @@ void syscall_handler(struct regs *r) if (!location) return; - serial_write("Received syscall!\n"); location(r->ebx, r->ecx, r->edx, r->esi, r->edi); } |