| plan 9 kernel history: overview | file list | diff list |
1998/0829/port/sysfile.c (diff list | history)
| 1998/0512/sys/src/9/port/sysfile.c:279,306 – 1998/0829/sys/src/9/port/sysfile.c:279,304 (short | long | prev | next) | ||
| 1990/0227 | long unionread(Chan *c, void *va, long n) { | |
| 1998/0829 | int i; | |
| 1990/0227 | long nr; | |
| 1992/0720 | Chan *nc; | |
| 1998/0829 | Mhead *m; Mount *mount; | |
| 1990/0227 | ||
| 1993/0501 |
| |
| 1993/0318 |
| |
| 1998/0829 | m = c->mh; rlock(&m->lock); mount = m->mount; for(i = 0; mount != nil && i < c->uri; i++) mount = mount->next; | |
| 1991/1011 | for(;;) { if(waserror()) { | |
| 1993/0318 |
| |
| 1998/0829 | runlock(&m->lock); | |
| 1991/1011 | nexterror(); } | |
| 1997/0327 |
| |
| 1998/0829 | nc = cclone(mount->to, 0); | |
| 1991/1011 | poperror(); | |
| 1992/0720 |
| |
| 1993/0318 |
| |
| 1997/0327 |
| |
| 1991/1011 |
| |
| 1993/0318 | /* Error causes component of union to be skipped */ | |
| 1998/0512 | if(waserror()) { | |
| 1997/0327 | cclose(nc); | |
| 1998/0512/sys/src/9/port/sysfile.c:316,333 – 1998/0829/sys/src/9/port/sysfile.c:314,331 | ||
| 1991/1011 | ||
| 1997/0327 | cclose(nc); | |
| 1991/1011 | if(nr > 0) { | |
| 1993/0318 |
| |
| 1998/0829 | runlock(&m->lock); | |
| 1991/1011 | return nr; } | |
| 1992/0720 | /* Advance to next element */ next: | |
| 1993/0318 |
| |
| 1991/1011 |
| |
| 1998/0829 | c->uri++; mount = mount->next; if(mount == nil) | |
| 1991/1011 | break; | |
| 1990/0227 | } | |
| 1993/0318 |
| |
| 1998/0829 | runlock(&m->lock); | |
| 1991/1011 | return 0; | |
| 1990/0227 | } | |
| 1998/0512/sys/src/9/port/sysfile.c:354,360 – 1998/0829/sys/src/9/port/sysfile.c:352,358 | ||
| 1994/0405 | error(Etoosmall); } | |
| 1998/0829 | if(dir && c->mh) | |
| 1994/0405 | n = unionread(c, (void*)arg[1], n); | |
| 1997/0408 | else if(devtab[c->type]->dc != L'M') | |
| 1997/0327 | n = devtab[c->type]->read(c, (void*)arg[1], n, c->offset); | |
| 1998/0512/sys/src/9/port/sysfile.c:394,400 – 1998/0829/sys/src/9/port/sysfile.c:392,398 | ||
| 1992/0114 | error(Etoosmall); | |
| 1990/0227 | } | |
| 1992/0825 |
| |
| 1998/0829 | if(dir && c->mh) | |
| 1990/0227 | n = unionread(c, (void*)arg[1], n); else | |
| 1997/0327 | n = devtab[c->type]->read(c, (void*)arg[1], n, c->offset); | |
| 1998/0512/sys/src/9/port/sysfile.c:514,519 – 1998/0829/sys/src/9/port/sysfile.c:512,518 | ||
| 1990/0227 | break; } | |
| 1998/0326 | *(vlong*)arg[0] = off; | |
| 1998/0829 | c->uri = 0; | |
| 1998/0403 | cclose(c); poperror(); | |
| 1998/0319 | } | |