diff options
author | Marvin Borner | 2019-12-08 12:27:00 +0100 |
---|---|---|
committer | Marvin Borner | 2019-12-08 12:27:00 +0100 |
commit | e3c982ee44cff38bd764fbb6ab94972cf868a10a (patch) | |
tree | 755ed2716a4a3fb6caf04abaef00a784297692fe /src/userspace | |
parent | d94b024b73aeca06de417e0fd3c502495312a8b2 (diff) |
Working text input!
Diffstat (limited to 'src/userspace')
-rw-r--r-- | src/userspace/main.c | 8 | ||||
-rw-r--r-- | src/userspace/syscall.h | 4 |
2 files changed, 5 insertions, 7 deletions
diff --git a/src/userspace/main.c b/src/userspace/main.c index c85e64d..1e68496 100644 --- a/src/userspace/main.c +++ b/src/userspace/main.c @@ -1,5 +1,4 @@ #include <syscall.h> -#include <mlibc/string.h> void user_main() { @@ -7,9 +6,8 @@ void user_main() syscall_write(hello); while (1) { - char *command = (char *) syscall_read(); - char test[1024]; - strcpy(test, command); - syscall_write(command); + char buffer[20] = {'\0'}; + syscall_read(buffer); + syscall_write(buffer); }; }
\ No newline at end of file diff --git a/src/userspace/syscall.h b/src/userspace/syscall.h index 6750093..d5d8920 100644 --- a/src/userspace/syscall.h +++ b/src/userspace/syscall.h @@ -64,13 +64,13 @@ */ DECL_SYSCALL1(write, char *); -DECL_SYSCALL0(read); +DECL_SYSCALL1(read, char *); /** * DEFINITIONS */ DEFN_SYSCALL1(write, 1, char *); -DEFN_SYSCALL0(read, 2); +DEFN_SYSCALL1(read, 2, char *); #endif |