| plan 9 kernel history: overview | file list | diff list |
2001/0819/port/sysfile.c (diff list | history)
| 2001/0731/sys/src/9/port/sysfile.c:271,276 – 2001/0819/sys/src/9/port/sysfile.c:271,277 (short | long | prev | next) | ||
| 2000/0215 | if(fd < 0) error(Enofd); | |
| 1991/0705 | poperror(); | |
| 2001/0819 | if(strstr(up->text, "syscall")!=0) pprint("open %s ref count %d\n", c2name(c), c->ref); // BUG | |
| 1990/0227 | return fd; } | |
| 2001/0731/sys/src/9/port/sysfile.c:668,686 – 2001/0819/sys/src/9/port/sysfile.c:669,685 | ||
| 1990/0227 | } long | |
| 2001/0819 | bindmount(int ismount, int fd, int afd, char* arg0, char* arg1, ulong flag, char* spec) | |
| 1990/0227 | { | |
| 1993/0501 |
| |
| 2001/0819 | int ret; Chan *c0, *c1, *ac, *bc; | |
| 1990/0227 | struct{ Chan *chan; | |
| 2001/0819 | Chan *authchan; | |
| 1990/0227 | char *spec; | |
| 1993/1014 | int flags; | |
| 1990/0227 | }bogus; | |
| 1992/0607 |
| |
| 1990/0227 | if(flag>MMASK || (flag&MORDER)==(MBEFORE|MAFTER)) | |
| 1990/11211 | error(Ebadarg); | |
| 1993/0501 | ||
| 2001/0731/sys/src/9/port/sysfile.c:690,709 – 2001/0819/sys/src/9/port/sysfile.c:689,715 | ||
| 2000/0322 | if(up->pgrp->noattach) error(Enoattach); | |
| 2001/0819 | ac = nil; | |
| 1993/0501 | bc = fdtochan(fd, ORDWR, 0, 1); | |
| 1992/0825 | if(waserror()) { | |
| 2001/0819 | if(ac) cclose(ac); | |
| 1997/0327 | cclose(bc); | |
| 1992/0825 | nexterror(); } | |
| 2001/0819 | if(afd >= 0) ac = fdtochan(afd, ORDWR, 0, 1); | |
| 1992/0825 | bogus.chan = bc; | |
| 2001/0819 | bogus.authchan = ac; | |
| 1992/0825 | ||
| 1990/11211 |
| |
| 2001/0527 |
| |
| 2001/0819 | validaddr((ulong)spec, 1, 0); validname(spec, 1); | |
| 1992/0825 | ||
| 1990/0227 |
| |
| 2001/0819 | bogus.spec = spec; | |
| 1999/0717 | if(waserror()) | |
| 1994/0622 | error(Ebadspec); | |
| 2001/0527 |
| |
| 1999/0717 | poperror(); | |
| 1992/0825 | ||
| 1990/0227 | ret = devno('M', 0); | |
| 2001/0731/sys/src/9/port/sysfile.c:710,721 – 2001/0819/sys/src/9/port/sysfile.c:716,729 | ||
| 1997/0327 | c0 = devtab[ret]->attach((char*)&bogus); | |
| 1992/0825 | poperror(); | |
| 2001/0819 | if(ac) cclose(ac); | |
| 1997/0327 | cclose(bc); | |
| 1992/0825 | } else { | |
| 1993/0501 | bogus.spec = 0; | |
| 1990/0227 |
| |
| 2001/0527 |
| |
| 2001/0819 | validaddr((ulong)arg0, 1, 0); c0 = namec(arg0, Amount, 0, 0); | |
| 1990/0227 | } | |
| 1993/0501 | ||
| 1990/0227 | if(waserror()){ | |
| 2001/0731/sys/src/9/port/sysfile.c:723,730 – 2001/0819/sys/src/9/port/sysfile.c:731,738 | ||
| 1990/0227 | nexterror(); } | |
| 1993/0501 | ||
| 1990/0227 |
| |
| 2001/0819 | validaddr((ulong)arg1, 1, 0); c1 = namec(arg1, Amount, 0, 0); | |
| 1990/0227 | if(waserror()){ | |
| 1997/0327 | cclose(c1); | |
| 1990/0227 | nexterror(); | |
| 2001/0731/sys/src/9/port/sysfile.c:738,743 – 2001/0819/sys/src/9/port/sysfile.c:746,752 | ||
| 1997/0327 | cclose(c0); | |
| 1991/0705 | if(ismount) | |
| 1992/0607 | fdclose(fd, 0); | |
| 2001/0819 | ||
| 1990/0227 | return ret; } | |
| 2001/0731/sys/src/9/port/sysfile.c:744,756 – 2001/0819/sys/src/9/port/sysfile.c:753,771 | ||
| 1990/0227 | long sysbind(ulong *arg) { | |
| 2001/0819 | return bindmount(0, -1, -1, (char*)arg[0], (char*)arg[1], arg[2], nil); | |
| 1990/0227 | } long sysmount(ulong *arg) { | |
| 2001/0819 | return bindmount(1, arg[0], arg[1], nil, (char*)arg[2], arg[3], (char*)arg[4]); } long sys_mount(ulong *arg) { return bindmount(1, arg[0], -1, nil, (char*)arg[1], arg[2], (char*)arg[3]); | |
| 1990/0227 | } long | |