| plan 9 kernel history: overview | file list | diff list |
1990/0321/port/chan.c (diff list | history)
| 1990/0303/sys/src/9/port/chan.c:149,155 – 1990/0321/sys/src/9/port/chan.c:149,155 (short | long | prev | next) | ||
| 1990/0227 | Mtab *mt, *mz; Mount *mnt, *omnt, *nmnt, *pmnt; Pgrp *pg; | |
| 1990/0321 | int islast; | |
| 1990/0227 | if(CHDIR & (old->qid^new->qid)) error(0, Emount); | |
| 1990/0303/sys/src/9/port/chan.c:157,166 – 1990/0321/sys/src/9/port/chan.c:157,171 | ||
| 1990/0227 | error(0, Emount); mz = 0; | |
| 1990/0321 | islast = 0; mnt = 0; | |
| 1990/0227 | pg = u->p->pgrp; lock(pg); if(waserror()){ | |
| 1990/0321 | if(mnt){ mnt->c = 0; /* caller will close new */ closemount(mnt); } | |
| 1990/0227 | unlock(pg); nexterror(); } | |
| 1990/0303/sys/src/9/port/chan.c:171,188 – 1990/0321/sys/src/9/port/chan.c:176,193 | ||
| 1990/0227 | for(i=0; i<pg->nmtab; i++,mt++){ if(mt->c==0 && mz==0) mz = mt; | |
| 1990/0321 | else if(eqchan(mt->c, old, CHDIR|QPATH)){ mz = 0; | |
| 1990/0227 | goto Found; | |
| 1990/0321 | } | |
| 1990/0227 | } | |
| 1990/0321 | islast++; | |
| 1990/0227 | } mz->mnt = 0; | |
| 1990/0303/sys/src/9/port/chan.c:244,251 – 1990/0321/sys/src/9/port/chan.c:249,260 | ||
| 1990/0227 | } incref(new); | |
| 1990/0321 | if(mz){ mz->c = old; | |
| 1990/0227 | incref(old); | |
| 1990/0321 | } if(islast) pg->nmtab++; | |
| 1990/0227 | unlock(pg); poperror(); return mnt->mountid; | |
| 1990/0303/sys/src/9/port/chan.c:286,292 – 1990/0321/sys/src/9/port/chan.c:295,301 | ||
| 1990/0227 | Found: lock(pg); if(!eqchan(mt->c, c, CHDIR|QPATH)){ /* table changed underfoot */ | |
| 1990/0321 | pprint("domount: changed underfoot?\n"); | |
| 1990/0227 | unlock(pg); return c; } | |
| 1990/0303/sys/src/9/port/chan.c:333,339 – 1990/0321/sys/src/9/port/chan.c:342,348 | ||
| 1990/0227 | goto Notfound; } if(c->mountid != mnt->mountid){ | |
| 1990/0321 | pprint("walk: changed underfoot?\n"); | |
| 1990/0227 | unlock(pg); goto Notfound; } | |
| 1990/0303/sys/src/9/port/chan.c:353,358 – 1990/0321/sys/src/9/port/chan.c:362,368 | ||
| 1990/0227 | if(!first) close(c); nc->mnt = mnt; | |
| 1990/0321 | nc->mountid = mnt->mountid; | |
| 1990/0227 | c = nc; first = 0; goto Again; | |
| 1990/0303/sys/src/9/port/chan.c:391,397 – 1990/0321/sys/src/9/port/chan.c:401,407 | ||
| 1990/0227 | } mnt = c->mnt; if(c->mountid != mnt->mountid){ | |
| 1990/0321 | pprint("createdir: changed underfoot?\n"); | |
| 1990/0227 | error(0, Enocreate); } do{ | |