From f844fafd324fbf4c7a986df2f0814f2e2d93bcd8 Mon Sep 17 00:00:00 2001 From: Miguel Date: Thu, 13 Sep 2018 14:32:28 +0200 Subject: thinking about syscalls and pipes --- kernel/syscalls.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'kernel/syscalls.c') diff --git a/kernel/syscalls.c b/kernel/syscalls.c index 8246df8..6707ec3 100644 --- a/kernel/syscalls.c +++ b/kernel/syscalls.c @@ -128,12 +128,10 @@ int syscall_write(int file, char *buf, int len) return len; } -int chk_syscall_read(int file, char *buf, int len) -{ - if(len> fifo_data_len[file])return 0; - return 1; -} - +/** + * __read()__ attemts to read up to _len_ bytes from file descriptor _file_ + * into the buffer starting at _buf_. + */ int syscall_read(int file, char *buf, int len) { //file 0 = stdin , file 1 = stdout , file 2 = stderr -- cgit v1.2.3