diff options
Diffstat (limited to 'src/kernel/syscall/actions/sys_write.c')
-rw-r--r-- | src/kernel/syscall/actions/sys_write.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/kernel/syscall/actions/sys_write.c b/src/kernel/syscall/actions/sys_write.c index 882ff19..aef2b2b 100644 --- a/src/kernel/syscall/actions/sys_write.c +++ b/src/kernel/syscall/actions/sys_write.c @@ -1,9 +1,11 @@ #include <stdint-gcc.h> -#include <mlibc/stdio.h> +#include <kernel/lib/stdio.h> +#include <kernel/lib/string.h> +#include <kernel/io/io.h> -uint32_t sys_write(unsigned int fd, unsigned int buf, unsigned int count) +uint32_t sys_write(unsigned int buf) { - for (uint32_t i = 0; i < count; i++) - writec(*((char *) buf++)); - return count; + serial_put(((char *) buf)[0]); + printf((const char *) buf); + return strlen((const char *) buf); }
\ No newline at end of file |