summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJake Mannens <jakem_5@hotmail.com>2020-02-24 17:39:40 +1100
committerJake Mannens <jakem_5@hotmail.com>2020-02-24 17:39:40 +1100
commit07c004bf3cf7fcb6e875bddb1a7fb0793377ebfb (patch)
tree6135939912e3ba14cebd47c7fd0d64522c3ed92e /lib
parenta77b79c1959a134764b88cfe70411d109c6c0354 (diff)
Changed read() and write() calls to now accept an integer file
descriptor as their first parameter. read()/write() calls to descriptors other than stdin/stdout respectively, are currently discared as the file table has yet to be fully implemented.
Diffstat (limited to 'lib')
-rw-r--r--lib/stdio.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/stdio.c b/lib/stdio.c
index b1c00ba..9fbf7fe 100644
--- a/lib/stdio.c
+++ b/lib/stdio.c
@@ -5,14 +5,14 @@
#include <unistd.h>
_syscall1(int, ctty, int, ctty);
-_syscall2(ssize_t, read, void*, buf, size_t, len);
-_syscall2(ssize_t, write, void*, buf, size_t, len);
+_syscall3(ssize_t, read, int, fd, void*, buf, size_t, len);
+_syscall3(ssize_t, write, int, fd, void*, buf, size_t, len);
int puts(char *s) {
size_t len = strlen(s);
ssize_t ret;
- ret = write(s, len);
+ ret = write(STDOUT_FILENO, s, len);
if(ret < 0)
return EOF;