From e3c982ee44cff38bd764fbb6ab94972cf868a10a Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sun, 8 Dec 2019 12:27:00 +0100 Subject: Working text input! --- src/userspace/main.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/userspace/main.c') 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 -#include 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 -- cgit v1.2.3