From 3e14c632b3b9c39d27693f2538f377fb52de193a Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Wed, 4 Dec 2019 22:15:27 +0100 Subject: Fully working syscall interface --- src/kernel/syscall/actions/sys_write.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/kernel/syscall/actions/sys_write.c') diff --git a/src/kernel/syscall/actions/sys_write.c b/src/kernel/syscall/actions/sys_write.c index 19c35fa..882ff19 100644 --- a/src/kernel/syscall/actions/sys_write.c +++ b/src/kernel/syscall/actions/sys_write.c @@ -1,12 +1,9 @@ #include #include -#include -uint32_t sys_write(unsigned int buf, unsigned int count) +uint32_t sys_write(unsigned int fd, unsigned int buf, unsigned int count) { - serial_write("\n"); - serial_write_dec(count); - serial_write("WRITE: \n"); - serial_write((const char *) buf); + for (uint32_t i = 0; i < count; i++) + writec(*((char *) buf++)); return count; } \ No newline at end of file -- cgit v1.2.3