aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/syscall/actions
diff options
context:
space:
mode:
authorMarvin Borner2019-12-17 21:50:02 +0100
committerMarvin Borner2019-12-17 21:50:02 +0100
commit025709e8643eb24e3360e575564b34ebd8062fd7 (patch)
tree16e45f68a958419a3e497e7b01e6472e92ffe94c /src/kernel/syscall/actions
parent6188eed3863e6087a7d5b7d988e91d711b45064b (diff)
Finally fixed text input syscalls!
I guess I can officially call me dumb now as I just forgot to return the actual value from the syscall handler...
Diffstat (limited to 'src/kernel/syscall/actions')
-rw-r--r--src/kernel/syscall/actions/sys_read.c7
-rw-r--r--src/kernel/syscall/actions/sys_write.c6
2 files changed, 4 insertions, 9 deletions
diff --git a/src/kernel/syscall/actions/sys_read.c b/src/kernel/syscall/actions/sys_read.c
index 02960f6..83e645c 100644
--- a/src/kernel/syscall/actions/sys_read.c
+++ b/src/kernel/syscall/actions/sys_read.c
@@ -16,10 +16,7 @@ uint32_t sys_read(char *buf)
return strlen(buf);
}
-uint32_t sys_readc(char *ch)
+uint32_t sys_readc()
{
- char buf = getch();
- ch = &buf;
- serial_put(*ch);
- return (uint32_t) ch;
+ return (uint32_t) getch();
} \ No newline at end of file
diff --git a/src/kernel/syscall/actions/sys_write.c b/src/kernel/syscall/actions/sys_write.c
index 8531e85..6377473 100644
--- a/src/kernel/syscall/actions/sys_write.c
+++ b/src/kernel/syscall/actions/sys_write.c
@@ -9,10 +9,8 @@ uint32_t sys_write(char *buf)
return strlen((const char *) buf);
}
-uint32_t sys_writec(char *ch)
+uint32_t sys_writec(char ch)
{
- serial_write_hex(*ch);
- serial_write("\n\n");
- writec((char) *ch);
+ writec((char) ch);
return 0;
} \ No newline at end of file