| plan 9 kernel history: overview | file list | diff list |
1990/0918/gnot/sysfile.c (diff list | history)
| 1990/0918/sys/src/9/gnot/sysfile.c:31,42 – 1990/0928/sys/src/9/gnot/sysfile.c:31,42 (short | long | prev | next) | ||
| 1990/03091 | if(fd<0 || NFD<=fd || (c=u->fd[fd])==0) error(0, Ebadfd); | |
| 1990/0928 | if(mode<0 || c->mode==ORDWR) | |
| 1990/03091 | return c; | |
| 1990/0928 | if((mode&OTRUNC) && c->mode==OREAD) | |
| 1990/03091 | err: error(0, Ebadusefd); | |
| 1990/0928 | if((mode&~OTRUNC) != c->mode) | |
| 1990/03091 | goto err; return c; } | |