diff options
Diffstat (limited to 'syscall.c')
-rw-r--r-- | syscall.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -271,8 +271,13 @@ sys_open(void) iunlock(ip); fd->type = FD_FILE; - fd->readable = 1; - fd->writeable = 0; + if (arg1) { + fd->readable = 1; + fd->writeable = 1; + } else { + fd->readable = 1; + fd->writeable = 0; + } fd->ip = ip; fd->off = 0; cp->fds[ufd] = fd; |