|
|
| version 1.9, 2004/03/01 06:33:20 | version 1.10, 2004/04/01 19:08:15 |
|---|---|
| Line 88 static int fdesc_setattr (struct vop_set | Line 88 static int fdesc_setattr (struct vop_set |
| * Initialise cache headers | * Initialise cache headers |
| */ | */ |
| int | int |
| fdesc_init(vfsp) | fdesc_init(struct vfsconf *vfsp) |
| struct vfsconf *vfsp; | |
| { | { |
| fdhashtbl = hashinit(NFDCACHE, M_CACHE, &fdhash); | fdhashtbl = hashinit(NFDCACHE, M_CACHE, &fdhash); |
| Line 97 fdesc_init(vfsp) | Line 96 fdesc_init(vfsp) |
| } | } |
| int | int |
| fdesc_allocvp(ftype, ix, mp, vpp, td) | fdesc_allocvp(fdntype ftype, int ix, struct mount *mp, struct vnode **vpp, |
| fdntype ftype; | struct thread *td) |
| int ix; | |
| struct mount *mp; | |
| struct vnode **vpp; | |
| struct thread *td; | |
| { | { |
| struct fdhashhead *fc; | struct fdhashhead *fc; |
| struct fdescnode *fd; | struct fdescnode *fd; |
| Line 163 out: | Line 158 out: |
| /* | /* |
| * vp is the current namei directory | * vp is the current namei directory |
| * ndp is the name to locate in that directory... | * ndp is the name to locate in that directory... |
| * | |
| * fdesc_lookup(struct vnode *a_dvp, struct vnode **a_vpp, | |
| * struct componentname *a_cnp) | |
| */ | */ |
| static int | static int |
| fdesc_lookup(ap) | fdesc_lookup(struct vop_lookup_args *ap) |
| struct vop_lookup_args /* { | |
| struct vnode * a_dvp; | |
| struct vnode ** a_vpp; | |
| struct componentname * a_cnp; | |
| } */ *ap; | |
| { | { |
| struct componentname *cnp = ap->a_cnp; | struct componentname *cnp = ap->a_cnp; |
| struct thread *td = cnp->cn_td; | struct thread *td = cnp->cn_td; |
| Line 237 bad: | Line 230 bad: |
| return (error); | return (error); |
| } | } |
| /* | |
| * fdesc_open(struct vnode *a_vp, int a_mode, struct ucred *a_cred, | |
| * struct thread *a_td) | |
| */ | |
| static int | static int |
| fdesc_open(ap) | fdesc_open(struct vop_open_args *ap) |
| struct vop_open_args /* { | |
| struct vnode *a_vp; | |
| int a_mode; | |
| struct ucred *a_cred; | |
| struct thread *a_td; | |
| } */ *ap; | |
| { | { |
| struct vnode *vp = ap->a_vp; | struct vnode *vp = ap->a_vp; |
| struct proc *p = ap->a_td->td_proc; | struct proc *p = ap->a_td->td_proc; |
| Line 266 fdesc_open(ap) | Line 257 fdesc_open(ap) |
| return (ENODEV); | return (ENODEV); |
| } | } |
| /* | |
| * fdesc_getattr(struct vnode *a_vp, struct vattr *a_vap, | |
| * struct ucred *a_cred, struct thread *a_td) | |
| */ | |
| static int | static int |
| fdesc_getattr(ap) | fdesc_getattr(struct vop_getattr_args *ap) |
| struct vop_getattr_args /* { | |
| struct vnode *a_vp; | |
| struct vattr *a_vap; | |
| struct ucred *a_cred; | |
| struct thread *a_td; | |
| } */ *ap; | |
| { | { |
| struct proc *p = ap->a_td->td_proc; | struct proc *p = ap->a_td->td_proc; |
| struct vnode *vp = ap->a_vp; | struct vnode *vp = ap->a_vp; |
| Line 365 fdesc_getattr(ap) | Line 354 fdesc_getattr(ap) |
| return (error); | return (error); |
| } | } |
| /* | |
| * fdesc_setattr(struct vnode *a_vp, struct vattr *a_vap, | |
| * struct ucred *a_cred, struct thread *a_td) | |
| */ | |
| static int | static int |
| fdesc_setattr(ap) | fdesc_setattr(struct vop_setattr_args *ap) |
| struct vop_setattr_args /* { | |
| struct vnode *a_vp; | |
| struct vattr *a_vap; | |
| struct ucred *a_cred; | |
| struct thread *a_td; | |
| } */ *ap; | |
| { | { |
| struct proc *p = ap->a_td->td_proc; | struct proc *p = ap->a_td->td_proc; |
| struct vattr *vap = ap->a_vap; | struct vattr *vap = ap->a_vap; |
| Line 412 fdesc_setattr(ap) | Line 399 fdesc_setattr(ap) |
| #define UIO_MX 16 | #define UIO_MX 16 |
| /* | |
| * fdesc_readdir(struct vnode *a_vp, struct uio *a_uio, struct ucred *a_cred, | |
| * int *a_eofflag, u_long *a_cookies, int a_ncookies) | |
| */ | |
| static int | static int |
| fdesc_readdir(ap) | fdesc_readdir(struct vop_readdir_args *ap) |
| struct vop_readdir_args /* { | |
| struct vnode *a_vp; | |
| struct uio *a_uio; | |
| struct ucred *a_cred; | |
| int *a_eofflag; | |
| u_long *a_cookies; | |
| int a_ncookies; | |
| } */ *ap; | |
| { | { |
| struct uio *uio = ap->a_uio; | struct uio *uio = ap->a_uio; |
| struct filedesc *fdp; | struct filedesc *fdp; |
| Line 489 done: | Line 472 done: |
| return (error); | return (error); |
| } | } |
| /* | |
| * fdesc_poll(struct vnode *a_vp, int a_events, struct ucred *a_cred, | |
| * struct thread *a_td) | |
| */ | |
| static int | static int |
| fdesc_poll(ap) | fdesc_poll(struct vop_poll_args *ap) |
| struct vop_poll_args /* { | |
| struct vnode *a_vp; | |
| int a_events; | |
| struct ucred *a_cred; | |
| struct thread *a_td; | |
| } */ *ap; | |
| { | { |
| return seltrue(0, ap->a_events, ap->a_td); | return seltrue(0, ap->a_events, ap->a_td); |
| } | } |
| /* | |
| * fdesc_inactive(struct vnode *a_vp, struct thread *a_td) | |
| */ | |
| static int | static int |
| fdesc_inactive(ap) | fdesc_inactive(struct vop_inactive_args *ap) |
| struct vop_inactive_args /* { | |
| struct vnode *a_vp; | |
| struct thread *a_td; | |
| } */ *ap; | |
| { | { |
| struct vnode *vp = ap->a_vp; | struct vnode *vp = ap->a_vp; |
| Line 519 fdesc_inactive(ap) | Line 499 fdesc_inactive(ap) |
| return (0); | return (0); |
| } | } |
| /* | |
| * fdesc_reclaim(struct vnode *a_vp) | |
| */ | |
| static int | static int |
| fdesc_reclaim(ap) | fdesc_reclaim(struct vop_reclaim_args *ap) |
| struct vop_reclaim_args /* { | |
| struct vnode *a_vp; | |
| } */ *ap; | |
| { | { |
| struct vnode *vp = ap->a_vp; | struct vnode *vp = ap->a_vp; |
| struct fdescnode *fd = VTOFDESC(vp); | struct fdescnode *fd = VTOFDESC(vp); |
| Line 537 fdesc_reclaim(ap) | Line 517 fdesc_reclaim(ap) |
| /* | /* |
| * Print out the contents of a /dev/fd vnode. | * Print out the contents of a /dev/fd vnode. |
| * | |
| * fdesc_print(struct vnode *a_vp) | |
| */ | */ |
| /* ARGSUSED */ | /* ARGSUSED */ |
| static int | static int |
| fdesc_print(ap) | fdesc_print(struct vop_print_args *ap) |
| struct vop_print_args /* { | |
| struct vnode *a_vp; | |
| } */ *ap; | |
| { | { |
| printf("tag VT_NON, fdesc vnode\n"); | printf("tag VT_NON, fdesc vnode\n"); |
| return (0); | return (0); |
| } | } |