From 68915f46e66ed65ce2d32009fdfa2f5dca116842 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Tue, 10 Dec 2019 21:47:41 +0100 Subject: Some syscalls and userspace stuff sorry for the worse-getting commit messages... --- src/kernel/syscall/actions/sys_read.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/kernel/syscall/actions/sys_read.c') diff --git a/src/kernel/syscall/actions/sys_read.c b/src/kernel/syscall/actions/sys_read.c index f04f3ef..02960f6 100644 --- a/src/kernel/syscall/actions/sys_read.c +++ b/src/kernel/syscall/actions/sys_read.c @@ -3,6 +3,7 @@ #include #include #include +#include uint32_t sys_read(char *buf) { @@ -15,7 +16,10 @@ uint32_t sys_read(char *buf) return strlen(buf); } -uint32_t sys_readc() +uint32_t sys_readc(char *ch) { - return getch(); + char buf = getch(); + ch = &buf; + serial_put(*ch); + return (uint32_t) ch; } \ No newline at end of file -- cgit v1.2.3