diff options
| author | Miguel <m.i@gmx.at> | 2018-09-13 14:32:28 +0200 |
|---|---|---|
| committer | Miguel <m.i@gmx.at> | 2018-09-13 14:32:28 +0200 |
| commit | f844fafd324fbf4c7a986df2f0814f2e2d93bcd8 (patch) | |
| tree | 30253b4757630124b23b29e8f09c3c77da07b423 /kernel/syscalls.c | |
| parent | b9f10c8a65a24db1c6a52d9df67230b75fa38d1a (diff) | |
thinking about syscalls and pipes
Diffstat (limited to 'kernel/syscalls.c')
| -rw-r--r-- | kernel/syscalls.c | 10 |
1 files changed, 4 insertions, 6 deletions
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 |
