153838Spendry /* 253838Spendry * Copyright (c) 1992 The Regents of the University of California 353838Spendry * Copyright (c) 1990, 1992 Jan-Simon Pendry 453838Spendry * All rights reserved. 553838Spendry * 653838Spendry * This code is derived from software donated to Berkeley by 753838Spendry * Jan-Simon Pendry. 853838Spendry * 953838Spendry * %sccs.include.redist.c% 1053838Spendry * 11*55170Spendry * @(#)fdesc_vnops.c 7.2 (Berkeley) 07/13/92 1253838Spendry * 1353838Spendry * $Id: fdesc_vnops.c,v 1.7 1992/05/30 10:05:34 jsp Exp jsp $ 1453838Spendry */ 1553838Spendry 1653838Spendry /* 1753838Spendry * /dev/fd Filesystem 1853838Spendry */ 1953838Spendry 2053838Spendry #include <sys/param.h> 2153838Spendry #include <sys/systm.h> 2253838Spendry #include <sys/types.h> 2353838Spendry #include <sys/time.h> 2453838Spendry #include <sys/proc.h> 2553838Spendry #include <sys/resourcevar.h> 2653838Spendry #include <sys/filedesc.h> 2753838Spendry #include <sys/vnode.h> 2853838Spendry #include <sys/malloc.h> 2953838Spendry #include <sys/file.h> 3053838Spendry #include <sys/stat.h> 3153838Spendry #include <sys/mount.h> 3253838Spendry #include <sys/namei.h> 3353838Spendry #include <sys/buf.h> 3454981Spendry #include <sys/dirent.h> 3555017Smckusick #include <miscfs/fdesc/fdesc.h> 3653838Spendry 3753838Spendry /* 3853838Spendry * vp is the current namei directory 3953838Spendry * ndp is the name to locate in that directory... 4053838Spendry */ 4155017Smckusick fdesc_lookup(ap) 4255017Smckusick struct vop_lookup_args /* { 4355017Smckusick struct vnode * a_dvp; 4455017Smckusick struct vnode ** a_vpp; 4555017Smckusick struct componentname * a_cnp; 4655017Smckusick } */ *ap; 4753838Spendry { 4854049Spendry struct vnode **vpp = ap->a_vpp; 4954049Spendry struct vnode *dvp = ap->a_dvp; 5053838Spendry char *pname; 5153838Spendry struct proc *p; 5253838Spendry int nfiles; 5353838Spendry unsigned fd; 5453838Spendry int error; 5553838Spendry struct vnode *fvp; 5653838Spendry 5753838Spendry #ifdef FDESC_DIAGNOSTIC 5853838Spendry printf("fdesc_lookup(%x)\n", ap); 5954049Spendry printf("fdesc_lookup(dp = %x, vpp = %x, cnp = %x)\n", dvp, vpp, ap->a_cnp); 6053838Spendry #endif 6153838Spendry pname = ap->a_cnp->cn_nameptr; 6253838Spendry #ifdef FDESC_DIAGNOSTIC 6353838Spendry printf("fdesc_lookup(%s)\n", pname); 6453838Spendry #endif 6553838Spendry if (ap->a_cnp->cn_namelen == 1 && *pname == '.') { 6654049Spendry *vpp = dvp; 6754049Spendry VREF(dvp); 6854049Spendry /*VOP_LOCK(dvp);*/ 6953838Spendry return (0); 7053838Spendry } 7153838Spendry 7253838Spendry p = ap->a_cnp->cn_proc; 7353838Spendry nfiles = p->p_fd->fd_nfiles; 7453838Spendry 7553838Spendry fd = 0; 7653838Spendry while (*pname >= '0' && *pname <= '9') { 7753838Spendry fd = 10 * fd + *pname++ - '0'; 7853838Spendry if (fd >= nfiles) 7953838Spendry break; 8053838Spendry } 8153838Spendry 8253838Spendry #ifdef FDESC_DIAGNOSTIC 8353838Spendry printf("fdesc_lookup: fd = %d, *pname = %x\n", fd, *pname); 8453838Spendry #endif 8553838Spendry if (*pname != '\0') { 8653838Spendry error = ENOENT; 8753838Spendry goto bad; 8853838Spendry } 8953838Spendry 9053838Spendry if (fd >= nfiles || p->p_fd->fd_ofiles[fd] == NULL) { 9153838Spendry error = EBADF; 9253838Spendry goto bad; 9353838Spendry } 9453838Spendry 9553838Spendry #ifdef FDESC_DIAGNOSTIC 9653838Spendry printf("fdesc_lookup: allocate new vnode\n"); 9753838Spendry #endif 9854049Spendry error = getnewvnode(VT_UFS, dvp->v_mount, fdesc_vnodeop_p, &fvp); 9953838Spendry if (error) 10053838Spendry goto bad; 10153838Spendry MALLOC(fvp->v_data, void *, sizeof(struct fdescnode), M_TEMP, M_WAITOK); 10253838Spendry VTOFDESC(fvp)->f_fd = fd; 10354049Spendry *vpp = fvp; 10453838Spendry #ifdef FDESC_DIAGNOSTIC 10553838Spendry printf("fdesc_lookup: newvp = %x\n", fvp); 10653838Spendry #endif 10753838Spendry return (0); 10853838Spendry 10953838Spendry bad:; 11054049Spendry *vpp = NULL; 11153838Spendry #ifdef FDESC_DIAGNOSTIC 11253838Spendry printf("fdesc_lookup: error = %d\n", error); 11353838Spendry #endif 11453838Spendry return (error); 11553838Spendry } 11653838Spendry 11755017Smckusick fdesc_open(ap) 11855017Smckusick struct vop_open_args /* { 11955017Smckusick struct vnode *a_vp; 12055017Smckusick int a_mode; 12155017Smckusick struct ucred *a_cred; 12255017Smckusick struct proc *a_p; 12355017Smckusick } */ *ap; 12453838Spendry { 12554049Spendry struct vnode *vp = ap->a_vp; 12654049Spendry 12753838Spendry /* 12853838Spendry * Can always open the root (modulo perms) 12953838Spendry */ 13054049Spendry if (vp->v_flag & VROOT) 13153838Spendry return (0); 13253838Spendry 13353838Spendry /* 13453838Spendry * XXX Kludge: set ap->a_p->p_dupfd to contain the value of the 13553838Spendry * the file descriptor being sought for duplication. The error 13653838Spendry * return ensures that the vnode for this device will be released 13753838Spendry * by vn_open. Open will detect this special error and take the 13853838Spendry * actions in dupfdopen. Other callers of vn_open or VOP_OPEN 13953838Spendry * will simply report the error. 14053838Spendry */ 14154049Spendry ap->a_p->p_dupfd = VTOFDESC(vp)->f_fd; /* XXX */ 14253838Spendry return (ENODEV); 14353838Spendry } 14453838Spendry 14553838Spendry static int 14653838Spendry fdesc_attr(fd, vap, cred, p) 14753838Spendry int fd; 14853838Spendry struct vattr *vap; 14953838Spendry struct ucred *cred; 15053838Spendry struct proc *p; 15153838Spendry { 15253838Spendry struct filedesc *fdp = p->p_fd; 15353838Spendry struct file *fp; 15453838Spendry int error; 15553838Spendry 15653838Spendry #ifdef FDESC_DIAGNOSTIC 15753838Spendry printf("fdesc_attr: fd = %d, nfiles = %d\n", fd, fdp->fd_nfiles); 15853838Spendry #endif 15953838Spendry if (fd >= fdp->fd_nfiles || (fp = fdp->fd_ofiles[fd]) == NULL) { 16053838Spendry #ifdef FDESC_DIAGNOSTIC 16153838Spendry printf("fdesc_attr: fp = %x (EBADF)\n", fp); 16253838Spendry #endif 16353838Spendry return (EBADF); 16453838Spendry } 16553838Spendry 16653838Spendry /* 16753838Spendry * Can stat the underlying vnode, but not sockets because 16853838Spendry * they don't use struct vattrs. Well, we could convert from 16953838Spendry * a struct stat back to a struct vattr, later... 17053838Spendry */ 17153838Spendry switch (fp->f_type) { 17253838Spendry case DTYPE_VNODE: 17353838Spendry error = VOP_GETATTR((struct vnode *) fp->f_data, vap, cred, p); 17453838Spendry break; 17553838Spendry 17653838Spendry case DTYPE_SOCKET: 17753838Spendry error = EOPNOTSUPP; 17853838Spendry break; 17953838Spendry 18053838Spendry default: 18153838Spendry panic("fdesc attr"); 18253838Spendry break; 18353838Spendry } 18453838Spendry 18553838Spendry #ifdef FDESC_DIAGNOSTIC 18653838Spendry printf("fdesc_attr: returns error %d\n", error); 18753838Spendry #endif 18853838Spendry return (error); 18953838Spendry } 19053838Spendry 19155017Smckusick fdesc_getattr(ap) 19255017Smckusick struct vop_getattr_args /* { 19355017Smckusick struct vnode *a_vp; 19455017Smckusick struct vattr *a_vap; 19555017Smckusick struct ucred *a_cred; 19655017Smckusick struct proc *a_p; 19755017Smckusick } */ *ap; 19853838Spendry { 19954049Spendry struct vnode *vp = ap->a_vp; 20054049Spendry struct vattr *vap = ap->a_vap; 20153838Spendry unsigned fd; 20253838Spendry int error; 20353838Spendry 20454049Spendry if (vp->v_flag & VROOT) { 20553838Spendry #ifdef FDESC_DIAGNOSTIC 20653838Spendry printf("fdesc_getattr: stat rootdir\n"); 20753838Spendry #endif 20854049Spendry bzero((caddr_t) vap, sizeof(*vap)); 20954049Spendry vattr_null(vap); 21054049Spendry vap->va_type = VDIR; 21154049Spendry vap->va_mode = S_IRUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH; 21254049Spendry vap->va_nlink = 2; 21354049Spendry vap->va_uid = 0; 21454049Spendry vap->va_gid = 0; 21554049Spendry vap->va_fsid = vp->v_mount->mnt_stat.f_fsid.val[0]; 21654049Spendry vap->va_fileid = 2; 21754049Spendry /* vap->va_qsize = 0; */ 21854049Spendry vap->va_size = DEV_BSIZE; 21954049Spendry vap->va_blocksize = DEV_BSIZE; 22054049Spendry microtime(&vap->va_atime); 22154049Spendry vap->va_mtime = vap->va_atime; 22254049Spendry vap->va_ctime = vap->va_ctime; 22354049Spendry vap->va_gen = 0; 22454049Spendry vap->va_flags = 0; 22554049Spendry vap->va_rdev = 0; 22654049Spendry /* vap->va_qbytes = 0; */ 22754049Spendry vap->va_bytes = 0; 22853838Spendry return (0); 22953838Spendry } 23053838Spendry 23154049Spendry fd = VTOFDESC(vp)->f_fd; 23254049Spendry error = fdesc_attr(fd, vap, ap->a_cred, ap->a_p); 23353838Spendry if (error == 0) 23454049Spendry vp->v_type = vap->va_type; 23553838Spendry return (error); 23653838Spendry } 23753838Spendry 23855017Smckusick fdesc_setattr(ap) 23955017Smckusick struct vop_setattr_args /* { 24055017Smckusick struct vnode *a_vp; 24155017Smckusick struct vattr *a_vap; 24255017Smckusick struct ucred *a_cred; 24355017Smckusick struct proc *a_p; 24455017Smckusick } */ *ap; 24553838Spendry { 24653838Spendry struct filedesc *fdp = ap->a_p->p_fd; 24753838Spendry struct file *fp; 24853838Spendry unsigned fd; 24953838Spendry int error; 25053838Spendry 25153838Spendry /* 25253838Spendry * Can't mess with the root vnode 25353838Spendry */ 25453838Spendry if (ap->a_vp->v_flag & VROOT) 25553838Spendry return (EACCES); 25653838Spendry 25753838Spendry fd = VTOFDESC(ap->a_vp)->f_fd; 25853838Spendry #ifdef FDESC_DIAGNOSTIC 25953838Spendry printf("fdesc_setattr: fd = %d, nfiles = %d\n", fd, fdp->fd_nfiles); 26053838Spendry #endif 26153838Spendry if (fd >= fdp->fd_nfiles || (fp = fdp->fd_ofiles[fd]) == NULL) { 26253838Spendry #ifdef FDESC_DIAGNOSTIC 26353838Spendry printf("fdesc_setattr: fp = %x (EBADF)\n", fp); 26453838Spendry #endif 26553838Spendry return (EBADF); 26653838Spendry } 26753838Spendry 26853838Spendry /* 26953838Spendry * Can setattr the underlying vnode, but not sockets! 27053838Spendry */ 27153838Spendry switch (fp->f_type) { 27253838Spendry case DTYPE_VNODE: 27353838Spendry error = VOP_SETATTR((struct vnode *) fp->f_data, ap->a_vap, ap->a_cred, ap->a_p); 27453838Spendry break; 27553838Spendry 27653838Spendry case DTYPE_SOCKET: 27753838Spendry error = EOPNOTSUPP; 27853838Spendry break; 27953838Spendry 28053838Spendry default: 28153838Spendry panic("fdesc setattr"); 28253838Spendry break; 28353838Spendry } 28453838Spendry 28553838Spendry #ifdef FDESC_DIAGNOSTIC 28653838Spendry printf("fdesc_setattr: returns error %d\n", error); 28753838Spendry #endif 28853838Spendry return (error); 28953838Spendry } 29053838Spendry 29155017Smckusick fdesc_readdir(ap) 29255017Smckusick struct vop_readdir_args /* { 29355017Smckusick struct vnode *a_vp; 29455017Smckusick struct uio *a_uio; 29555017Smckusick struct ucred *a_cred; 29655017Smckusick } */ *ap; 29753838Spendry { 29854049Spendry struct uio *uio = ap->a_uio; 29953838Spendry struct filedesc *fdp; 30053838Spendry int i; 30153838Spendry int error; 30253838Spendry 30353838Spendry #define UIO_MX 16 30453838Spendry 30554049Spendry fdp = uio->uio_procp->p_fd; 30654049Spendry i = uio->uio_offset / UIO_MX; 30753838Spendry error = 0; 30854049Spendry while (uio->uio_resid > 0) { 30953838Spendry if (i >= fdp->fd_nfiles) { 31054980Spendry /* *ap->a_eofflagp = 1; */ 31153838Spendry break; 31253838Spendry } 31353838Spendry if (fdp->fd_ofiles[i] != NULL) { 31454981Spendry struct dirent d; 31554981Spendry struct dirent *dp = &d; 31653838Spendry char *cp = dp->d_name; 31753838Spendry #ifdef FDESC_FILEID 31853838Spendry struct vattr va; 31953838Spendry #endif 32053838Spendry bzero((caddr_t) dp, UIO_MX); 32153838Spendry 32253838Spendry dp->d_namlen = sprintf(dp->d_name, "%d", i); 32353838Spendry /* 32453838Spendry * Fill in the remaining fields 32553838Spendry */ 32653838Spendry dp->d_reclen = UIO_MX; 32754981Spendry dp->d_type = DT_UNKNOWN; 32854981Spendry dp->d_fileno = i + 3; 32953838Spendry #ifdef FDESC_FILEID 33053838Spendry /* 33153838Spendry * If we want the file ids to match the 33253838Spendry * we must call getattr on the underlying file. 33353838Spendry * fdesc_attr may return an error, in which case 33453838Spendry * we ignore the returned file id. 33553838Spendry */ 33653838Spendry error = fdesc_attr(i, &va, ap->a_cred, p); 33753838Spendry if (error == 0) 33853838Spendry dp->d_ino = va.va_fileid; 33953838Spendry #endif 34053838Spendry /* 34153838Spendry * And ship to userland 34253838Spendry */ 34354049Spendry error = uiomove((caddr_t) dp, UIO_MX, uio); 34453838Spendry if (error) 34553838Spendry break; 34653838Spendry } 34753838Spendry i++; 34853838Spendry } 34953838Spendry 35054049Spendry uio->uio_offset = i * UIO_MX; 35153838Spendry return (error); 35253838Spendry } 35353838Spendry 35455017Smckusick fdesc_inactive(ap) 35555017Smckusick struct vop_inactive_args /* { 35655017Smckusick struct vnode *a_vp; 35755017Smckusick } */ *ap; 35853838Spendry { 35954049Spendry struct vnode *vp = ap->a_vp; 36054049Spendry 36153838Spendry /* 36253838Spendry * Clear out the v_type field to avoid 36353838Spendry * nasty things happening in vgone(). 36453838Spendry */ 36554049Spendry vp->v_type = VNON; 36653838Spendry #ifdef FDESC_DIAGNOSTIC 36754049Spendry printf("fdesc_inactive(%x)\n", vp); 36853838Spendry #endif 36953838Spendry return (0); 37053838Spendry } 37153838Spendry 37255017Smckusick fdesc_reclaim(ap) 37355017Smckusick struct vop_reclaim_args /* { 37455017Smckusick struct vnode *a_vp; 37555017Smckusick } */ *ap; 37653838Spendry { 37753838Spendry struct vnode *vp = ap->a_vp; 37853838Spendry printf("fdesc_reclaim(%x)\n", vp); 37953838Spendry if (vp->v_data) { 38053838Spendry FREE(vp->v_data, M_TEMP); 38153838Spendry vp->v_data = 0; 38253838Spendry } 38353838Spendry return (0); 38453838Spendry } 38553838Spendry 38653838Spendry /* 38753838Spendry * Print out the contents of a /dev/fd vnode. 38853838Spendry */ 38953838Spendry /* ARGSUSED */ 39055017Smckusick fdesc_print(ap) 39155017Smckusick struct vop_print_args /* { 39255017Smckusick struct vnode *a_vp; 39355017Smckusick } */ *ap; 39453838Spendry { 39555017Smckusick 39653838Spendry printf("tag VT_NON, fdesc vnode\n"); 39755017Smckusick return (0); 39853838Spendry } 39953838Spendry 40053838Spendry /*void*/ 40155017Smckusick fdesc_vfree(ap) 40255017Smckusick struct vop_vfree_args /* { 40355017Smckusick struct vnode *a_pvp; 40455017Smckusick ino_t a_ino; 40555017Smckusick int a_mode; 40655017Smckusick } */ *ap; 40753838Spendry { 40853838Spendry 40955017Smckusick return (0); 41053838Spendry } 41153838Spendry 41253838Spendry /* 41353838Spendry * /dev/fd vnode unsupported operation 41453838Spendry */ 41553838Spendry fdesc_enotsupp() 41653838Spendry { 41755017Smckusick 41853838Spendry return (EOPNOTSUPP); 41953838Spendry } 42053838Spendry 42153838Spendry /* 42253838Spendry * /dev/fd "should never get here" operation 42353838Spendry */ 42453838Spendry fdesc_badop() 42553838Spendry { 42655017Smckusick 42753838Spendry panic("fdesc: bad op"); 42853838Spendry /* NOTREACHED */ 42953838Spendry } 43053838Spendry 43153838Spendry /* 43253838Spendry * /dev/fd vnode null operation 43353838Spendry */ 43453838Spendry fdesc_nullop() 43553838Spendry { 43655017Smckusick 43753838Spendry return (0); 43853838Spendry } 43953838Spendry 44053838Spendry #define fdesc_create ((int (*) __P((struct vop_create_args *)))fdesc_enotsupp) 44153838Spendry #define fdesc_mknod ((int (*) __P((struct vop_mknod_args *)))fdesc_enotsupp) 44253838Spendry #define fdesc_close ((int (*) __P((struct vop_close_args *)))nullop) 44353838Spendry #define fdesc_access ((int (*) __P((struct vop_access_args *)))nullop) 44453838Spendry #define fdesc_read ((int (*) __P((struct vop_read_args *)))fdesc_enotsupp) 44553838Spendry #define fdesc_write ((int (*) __P((struct vop_write_args *)))fdesc_enotsupp) 44653838Spendry #define fdesc_ioctl ((int (*) __P((struct vop_ioctl_args *)))fdesc_enotsupp) 44753838Spendry #define fdesc_select ((int (*) __P((struct vop_select_args *)))fdesc_enotsupp) 44853838Spendry #define fdesc_mmap ((int (*) __P((struct vop_mmap_args *)))fdesc_enotsupp) 44953838Spendry #define fdesc_fsync ((int (*) __P((struct vop_fsync_args *)))nullop) 45053838Spendry #define fdesc_seek ((int (*) __P((struct vop_seek_args *)))nullop) 45153838Spendry #define fdesc_remove ((int (*) __P((struct vop_remove_args *)))fdesc_enotsupp) 45253838Spendry #define fdesc_link ((int (*) __P((struct vop_link_args *)))fdesc_enotsupp) 45353838Spendry #define fdesc_rename ((int (*) __P((struct vop_rename_args *)))fdesc_enotsupp) 45453838Spendry #define fdesc_mkdir ((int (*) __P((struct vop_mkdir_args *)))fdesc_enotsupp) 45553838Spendry #define fdesc_rmdir ((int (*) __P((struct vop_rmdir_args *)))fdesc_enotsupp) 45655017Smckusick #define fdesc_symlink ((int (*) __P((struct vop_symlink_args *)))fdesc_enotsupp) 457*55170Spendry #define fdesc_readlink \ 45855017Smckusick ((int (*) __P((struct vop_readlink_args *)))fdesc_enotsupp) 45953838Spendry #define fdesc_abortop ((int (*) __P((struct vop_abortop_args *)))nullop) 46053838Spendry #define fdesc_lock ((int (*) __P((struct vop_lock_args *)))nullop) 46153838Spendry #define fdesc_unlock ((int (*) __P((struct vop_unlock_args *)))nullop) 46253838Spendry #define fdesc_bmap ((int (*) __P((struct vop_bmap_args *)))fdesc_badop) 46353838Spendry #define fdesc_strategy ((int (*) __P((struct vop_strategy_args *)))fdesc_badop) 46453838Spendry #define fdesc_islocked ((int (*) __P((struct vop_islocked_args *)))nullop) 46555017Smckusick #define fdesc_advlock ((int (*) __P((struct vop_advlock_args *)))fdesc_enotsupp) 466*55170Spendry #define fdesc_blkatoff \ 46755017Smckusick ((int (*) __P((struct vop_blkatoff_args *)))fdesc_enotsupp) 46853838Spendry #define fdesc_vget ((int (*) __P((struct vop_vget_args *)))fdesc_enotsupp) 46953838Spendry #define fdesc_valloc ((int(*) __P(( \ 47053838Spendry struct vnode *pvp, \ 47153838Spendry int mode, \ 47253838Spendry struct ucred *cred, \ 47353838Spendry struct vnode **vpp))) fdesc_enotsupp) 474*55170Spendry #define fdesc_truncate \ 47555017Smckusick ((int (*) __P((struct vop_truncate_args *)))fdesc_enotsupp) 47653838Spendry #define fdesc_update ((int (*) __P((struct vop_update_args *)))fdesc_enotsupp) 47753838Spendry #define fdesc_bwrite ((int (*) __P((struct vop_bwrite_args *)))fdesc_enotsupp) 47853838Spendry 47953838Spendry int (**fdesc_vnodeop_p)(); 48053838Spendry struct vnodeopv_entry_desc fdesc_vnodeop_entries[] = { 48153838Spendry { &vop_default_desc, vn_default_error }, 48253838Spendry { &vop_lookup_desc, fdesc_lookup }, /* lookup */ 48353838Spendry { &vop_create_desc, fdesc_create }, /* create */ 48453838Spendry { &vop_mknod_desc, fdesc_mknod }, /* mknod */ 48555017Smckusick { &vop_open_desc, fdesc_open }, /* open */ 48653838Spendry { &vop_close_desc, fdesc_close }, /* close */ 48753838Spendry { &vop_access_desc, fdesc_access }, /* access */ 48853838Spendry { &vop_getattr_desc, fdesc_getattr }, /* getattr */ 48953838Spendry { &vop_setattr_desc, fdesc_setattr }, /* setattr */ 49055017Smckusick { &vop_read_desc, fdesc_read }, /* read */ 49153838Spendry { &vop_write_desc, fdesc_write }, /* write */ 49253838Spendry { &vop_ioctl_desc, fdesc_ioctl }, /* ioctl */ 49353838Spendry { &vop_select_desc, fdesc_select }, /* select */ 49455017Smckusick { &vop_mmap_desc, fdesc_mmap }, /* mmap */ 49553838Spendry { &vop_fsync_desc, fdesc_fsync }, /* fsync */ 49655017Smckusick { &vop_seek_desc, fdesc_seek }, /* seek */ 49753838Spendry { &vop_remove_desc, fdesc_remove }, /* remove */ 49855017Smckusick { &vop_link_desc, fdesc_link }, /* link */ 49953838Spendry { &vop_rename_desc, fdesc_rename }, /* rename */ 50053838Spendry { &vop_mkdir_desc, fdesc_mkdir }, /* mkdir */ 50153838Spendry { &vop_rmdir_desc, fdesc_rmdir }, /* rmdir */ 50253838Spendry { &vop_symlink_desc, fdesc_symlink }, /* symlink */ 50353838Spendry { &vop_readdir_desc, fdesc_readdir }, /* readdir */ 50453838Spendry { &vop_readlink_desc, fdesc_readlink }, /* readlink */ 50553838Spendry { &vop_abortop_desc, fdesc_abortop }, /* abortop */ 50653838Spendry { &vop_inactive_desc, fdesc_inactive }, /* inactive */ 50753838Spendry { &vop_reclaim_desc, fdesc_reclaim }, /* reclaim */ 50855017Smckusick { &vop_lock_desc, fdesc_lock }, /* lock */ 50953838Spendry { &vop_unlock_desc, fdesc_unlock }, /* unlock */ 51055017Smckusick { &vop_bmap_desc, fdesc_bmap }, /* bmap */ 51153838Spendry { &vop_strategy_desc, fdesc_strategy }, /* strategy */ 51253838Spendry { &vop_print_desc, fdesc_print }, /* print */ 51353838Spendry { &vop_islocked_desc, fdesc_islocked }, /* islocked */ 51453838Spendry { &vop_advlock_desc, fdesc_advlock }, /* advlock */ 51553838Spendry { &vop_blkatoff_desc, fdesc_blkatoff }, /* blkatoff */ 51653838Spendry { &vop_valloc_desc, fdesc_valloc }, /* valloc */ 51753838Spendry { &vop_vfree_desc, fdesc_vfree }, /* vfree */ 51853838Spendry { &vop_truncate_desc, fdesc_truncate }, /* truncate */ 51953838Spendry { &vop_update_desc, fdesc_update }, /* update */ 52053838Spendry { &vop_bwrite_desc, fdesc_bwrite }, /* bwrite */ 52153838Spendry { (struct vnodeop_desc*)NULL, (int(*)())NULL } 52253838Spendry }; 52353838Spendry struct vnodeopv_desc fdesc_vnodeop_opv_desc = 52453838Spendry { &fdesc_vnodeop_p, fdesc_vnodeop_entries }; 525