diff options
author | Marvin Borner | 2019-12-10 21:47:41 +0100 |
---|---|---|
committer | Marvin Borner | 2019-12-10 21:47:41 +0100 |
commit | 68915f46e66ed65ce2d32009fdfa2f5dca116842 (patch) | |
tree | 7d6df3e4dc6219422cc4b1faf909ff32a74b6edf /src/kernel/syscall/actions/sys_read.c | |
parent | 33bdf18dad2539aca21727e95e04bfedecd37a76 (diff) |
Some syscalls and userspace stuff
sorry for the worse-getting commit messages...
Diffstat (limited to 'src/kernel/syscall/actions/sys_read.c')
-rw-r--r-- | src/kernel/syscall/actions/sys_read.c | 8 |
1 files changed, 6 insertions, 2 deletions
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 <kernel/input/input.h> #include <kernel/lib/lib.h> #include <kernel/lib/string.h> +#include <kernel/io/io.h> 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 |