2 * Copyright (c) 2000 Dag-Erling Coïdan Smørgrav
3 * Copyright (c) 1999 Pierre Beyssac
4 * Copyright (c) 1993, 1995 Jan-Simon Pendry
5 * Copyright (c) 1993, 1995
6 * The Regents of the University of California. All rights reserved.
8 * This code is derived from software contributed to Berkeley by
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions and the following disclaimer.
16 * 2. Redistributions in binary form must reproduce the above copyright
17 * notice, this list of conditions and the following disclaimer in the
18 * documentation and/or other materials provided with the distribution.
19 * 3. All advertising materials mentioning features or use of this software
20 * must display the following acknowledgement:
21 * This product includes software developed by the University of
22 * California, Berkeley and its contributors.
23 * 4. Neither the name of the University nor the names of its contributors
24 * may be used to endorse or promote products derived from this software
25 * without specific prior written permission.
27 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
28 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
30 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
31 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
32 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
33 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
34 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
35 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
36 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
39 * @(#)procfs_vnops.c 8.18 (Berkeley) 5/21/95
41 * $FreeBSD: src/sys/i386/linux/linprocfs/linprocfs_vnops.c,v 1.3.2.5 2001/08/12 14:29:19 rwatson Exp $
42 * $DragonFly: src/sys/emulation/linux/i386/linprocfs/linprocfs_vnops.c,v 1.6 2003/07/19 21:14:36 dillon Exp $
46 * procfs vnode interface
49 #include <sys/param.h>
50 #include <sys/systm.h>
52 #include <sys/kernel.h>
54 #include <sys/fcntl.h>
56 #include <sys/signalvar.h>
57 #include <sys/vnode.h>
58 #include <sys/mount.h>
59 #include <sys/namei.h>
60 #include <sys/dirent.h>
61 #include <sys/malloc.h>
62 #include <machine/reg.h>
63 #include <vm/vm_zone.h>
64 #include <i386/linux/linprocfs/linprocfs.h>
65 #include <sys/pioctl.h>
67 extern struct vnode *procfs_findtextvp __P((struct proc *));
69 static int linprocfs_access __P((struct vop_access_args *));
70 static int linprocfs_badop __P((void));
71 static int linprocfs_bmap __P((struct vop_bmap_args *));
72 static int linprocfs_close __P((struct vop_close_args *));
73 static int linprocfs_getattr __P((struct vop_getattr_args *));
74 static int linprocfs_inactive __P((struct vop_inactive_args *));
75 static int linprocfs_ioctl __P((struct vop_ioctl_args *));
76 static int linprocfs_lookup __P((struct vop_lookup_args *));
77 static int linprocfs_open __P((struct vop_open_args *));
78 static int linprocfs_print __P((struct vop_print_args *));
79 static int linprocfs_readdir __P((struct vop_readdir_args *));
80 static int linprocfs_readlink __P((struct vop_readlink_args *));
81 static int linprocfs_reclaim __P((struct vop_reclaim_args *));
82 static int linprocfs_setattr __P((struct vop_setattr_args *));
85 * This is a list of the valid names in the
86 * process-specific sub-directories. It is
87 * used in linprocfs_lookup and linprocfs_readdir
89 static struct proc_target {
94 int (*pt_valid) __P((struct proc *p));
96 #define N(s) sizeof(s)-1, s
97 /* name type validp */
98 { DT_DIR, N("."), Pproc, NULL },
99 { DT_DIR, N(".."), Proot, NULL },
100 { DT_REG, N("mem"), Pmem, NULL },
101 { DT_LNK, N("exe"), Pexe, NULL },
102 { DT_REG, N("stat"), Pprocstat, NULL },
103 { DT_REG, N("status"), Pprocstatus, NULL },
106 static const int nproc_targets = sizeof(proc_targets) / sizeof(proc_targets[0]);
108 static pid_t atopid __P((const char *, u_int));
111 * set things up for doing i/o on
112 * the pfsnode (vp). (vp) is locked
113 * on entry, and should be left locked
116 * for procfs we don't need to do anything
117 * in particular for i/o. all that is done
118 * is to support exclusive open on process
123 struct vop_open_args /* {
126 struct ucred *a_cred;
130 struct pfsnode *pfs = VTOPFS(ap->a_vp);
133 p2 = PFIND(pfs->pfs_pid);
136 if (pfs->pfs_pid && !PRISON_CHECK(ap->a_cred, p2->p_ucred))
139 switch (pfs->pfs_type) {
141 if (((pfs->pfs_flags & FWRITE) && (ap->a_mode & O_EXCL)) ||
142 ((pfs->pfs_flags & O_EXCL) && (ap->a_mode & FWRITE)))
145 if (p_trespass(ap->a_cred, p2->p_ucred))
148 if (ap->a_mode & FWRITE)
149 pfs->pfs_flags = ap->a_mode & (FWRITE|O_EXCL);
161 * close the pfsnode (vp) after doing i/o.
162 * (vp) is not locked on entry or exit.
164 * nothing to do for procfs other than undo
165 * any exclusive open flag (see _open above).
169 struct vop_close_args /* {
172 struct ucred *a_cred;
176 struct pfsnode *pfs = VTOPFS(ap->a_vp);
179 switch (pfs->pfs_type) {
181 if ((ap->a_fflag & FWRITE) && (pfs->pfs_flags & O_EXCL))
182 pfs->pfs_flags &= ~(FWRITE|O_EXCL);
184 * If this is the last close, then it checks to see if
185 * the target process has PF_LINGER set in p_pfsflags,
186 * if this is *not* the case, then the process' stop flags
187 * are cleared, and the process is woken up. This is
188 * to help prevent the case where a process has been
189 * told to stop on an event, but then the requesting process
190 * has gone away or forgotten about it.
192 if ((ap->a_vp->v_usecount < 2)
193 && (p = pfind(pfs->pfs_pid))
194 && !(p->p_pfsflags & PF_LINGER)) {
208 * do an ioctl operation on a pfsnode (vp).
209 * (vp) is not locked on entry or exit.
213 struct vop_ioctl_args *ap;
215 struct pfsnode *pfs = VTOPFS(ap->a_vp);
220 struct procfs_status *psp;
224 procp = pfind(pfs->pfs_pid);
229 if (p_trespass(ap->a_cred, procp->p_ucred))
232 switch (ap->a_command) {
234 procp->p_stops |= *(unsigned int*)ap->a_data;
237 procp->p_stops &= ~*(unsigned int*)ap->a_data;
241 * NFLAGS is "non-suser_xxx flags" -- currently, only
242 * PFS_ISUGID ("ignore set u/g id");
244 #define NFLAGS (PF_ISUGID)
245 flags = (unsigned char)*(unsigned int*)ap->a_data;
246 if (flags & NFLAGS && (error = suser_cred(ap->a_cred, 0)))
248 procp->p_pfsflags = flags;
251 *(unsigned int*)ap->a_data = (unsigned int)procp->p_pfsflags;
253 psp = (struct procfs_status *)ap->a_data;
254 psp->state = (procp->p_step == 0);
255 psp->flags = procp->p_pfsflags;
256 psp->events = procp->p_stops;
258 psp->why = procp->p_stype;
259 psp->val = procp->p_xstat;
261 psp->why = psp->val = 0; /* Not defined values */
265 psp = (struct procfs_status *)ap->a_data;
266 if (procp->p_step == 0) {
267 error = tsleep(&procp->p_stype, PCATCH, "piocwait", 0);
271 psp->state = 1; /* It stopped */
272 psp->flags = procp->p_pfsflags;
273 psp->events = procp->p_stops;
274 psp->why = procp->p_stype; /* why it stopped */
275 psp->val = procp->p_xstat; /* any extra info */
277 case PIOCCONT: /* Restart a proc */
278 if (procp->p_step == 0)
279 return EINVAL; /* Can only start a stopped process */
280 if ((signo = *(int*)ap->a_data) != 0) {
281 if (signo >= NSIG || signo <= 0)
283 psignal(procp, signo);
286 wakeup(&procp->p_step);
295 * do block mapping for pfsnode (vp).
296 * since we don't use the buffer cache
297 * for procfs this function should never
298 * be called. in any case, it's not clear
299 * what part of the kernel ever makes use
300 * of this function. for sanity, this is the
301 * usual no-op bmap, although returning
302 * (EIO) would be a reasonable alternative.
306 struct vop_bmap_args /* {
309 struct vnode **a_vpp;
315 if (ap->a_vpp != NULL)
316 *ap->a_vpp = ap->a_vp;
317 if (ap->a_bnp != NULL)
318 *ap->a_bnp = ap->a_bn;
319 if (ap->a_runp != NULL)
325 * linprocfs_inactive is called when the pfsnode
326 * is vrele'd and the reference count goes
327 * to zero. (vp) will be on the vnode free
328 * list, so to get it back vget() must be
331 * (vp) is locked on entry, but must be unlocked on exit.
334 linprocfs_inactive(ap)
335 struct vop_inactive_args /* {
339 struct vnode *vp = ap->a_vp;
341 VOP_UNLOCK(vp, 0, ap->a_td);
347 * _reclaim is called when getnewvnode()
348 * wants to make use of an entry on the vnode
349 * free list. at this time the filesystem needs
350 * to free any private data and remove the node
351 * from any private lists.
354 linprocfs_reclaim(ap)
355 struct vop_reclaim_args /* {
360 return (linprocfs_freevp(ap->a_vp));
364 * _print is used for debugging.
365 * just print a readable description
370 struct vop_print_args /* {
374 struct pfsnode *pfs = VTOPFS(ap->a_vp);
376 printf("tag VT_PROCFS, type %d, pid %ld, mode %x, flags %lx\n",
377 pfs->pfs_type, (long)pfs->pfs_pid, pfs->pfs_mode, pfs->pfs_flags);
382 * generic entry point for unsupported operations
392 * Invent attributes for pfsnode (vp) and store
394 * Directories lengths are returned as zero since
395 * any real length would require the genuine size
396 * to be computed, and nothing cares anyway.
398 * this is relatively minimal for procfs.
401 linprocfs_getattr(ap)
402 struct vop_getattr_args /* {
405 struct ucred *a_cred;
409 struct pfsnode *pfs = VTOPFS(ap->a_vp);
410 struct vattr *vap = ap->a_vap;
415 * First make sure that the process and its credentials
418 switch (pfs->pfs_type) {
425 procp = PFIND(pfs->pfs_pid);
426 if (procp == 0 || procp->p_ucred == NULL)
432 /* start by zeroing out the attributes */
435 /* next do all the common fields */
436 vap->va_type = ap->a_vp->v_type;
437 vap->va_mode = pfs->pfs_mode;
438 vap->va_fileid = pfs->pfs_fileno;
440 vap->va_blocksize = PAGE_SIZE;
441 vap->va_bytes = vap->va_size = 0;
442 vap->va_fsid = ap->a_vp->v_mount->mnt_stat.f_fsid.val[0];
445 * Make all times be current TOD.
446 * It would be possible to get the process start
447 * time from the p_stat structure, but there's
448 * no "file creation" time stamp anyway, and the
449 * p_stat structure is not addressible if u. gets
450 * swapped out for that process.
452 nanotime(&vap->va_ctime);
453 vap->va_atime = vap->va_mtime = vap->va_ctime;
456 * now do the object specific fields
458 * The size could be set from struct reg, but it's hardly
459 * worth the trouble, and it puts some (potentially) machine
460 * dependent data into this machine-independent code. If it
461 * becomes important then this function should break out into
462 * a per-file stat function in the corresponding .c file.
467 vap->va_uid = procp->p_ucred->cr_uid;
468 vap->va_gid = procp->p_ucred->cr_gid;
471 switch (pfs->pfs_type) {
474 * Set nlink to 1 to tell fts(3) we don't actually know.
479 vap->va_size = vap->va_bytes = DEV_BSIZE;
483 char buf[16]; /* should be enough */
486 vap->va_size = vap->va_bytes =
487 snprintf(buf, sizeof(buf), "%ld", (long)curproc->p_pid);
492 vap->va_nlink = nproc_targets;
493 vap->va_size = vap->va_bytes = DEV_BSIZE;
497 char *fullpath, *freepath;
498 error = textvp_fullpath(procp, &fullpath, &freepath);
500 vap->va_size = strlen(fullpath);
501 free(freepath, M_TEMP);
503 vap->va_size = sizeof("unknown") - 1;
506 vap->va_bytes = vap->va_size;
516 vap->va_bytes = vap->va_size = 0;
523 * If we denied owner access earlier, then we have to
524 * change the owner to root - otherwise 'ps' and friends
525 * will break even though they are setgid kmem. *SIGH*
527 if (procp->p_flag & P_SUGID)
530 vap->va_uid = procp->p_ucred->cr_uid;
535 vap->va_bytes = vap->va_size = 0;
536 /* uid, gid are already set */
540 panic("linprocfs_getattr");
547 linprocfs_setattr(ap)
548 struct vop_setattr_args /* {
551 struct ucred *a_cred;
556 if (ap->a_vap->va_flags != VNOVAL)
560 * just fake out attribute setting
561 * it's not good to generate an error
562 * return, otherwise things like creat()
563 * will fail when they try to set the
564 * file length to 0. worse, this means
565 * that echo $note > /proc/$pid/note will fail.
572 * implement access checking.
574 * something very similar to this code is duplicated
575 * throughout the 4bsd kernel and should be moved
576 * into kern/vfs_subr.c sometime.
578 * actually, the check for super-user is slightly
579 * broken since it will allow read access to write-only
580 * objects. this doesn't cause any particular trouble
581 * but does mean that the i/o entry points need to check
582 * that the operation really does make sense.
586 struct vop_access_args /* {
589 struct ucred *a_cred;
598 * If you're the super-user,
599 * you always get access.
601 if (ap->a_cred->cr_uid == 0)
605 error = VOP_GETATTR(ap->a_vp, vap, ap->a_td);
610 * Access check is based on only one of owner, group, public.
611 * If not owner, then check group. If not a member of the
612 * group, then check public access.
614 if (ap->a_cred->cr_uid != vap->va_uid) {
619 gp = ap->a_cred->cr_groups;
620 for (i = 0; i < ap->a_cred->cr_ngroups; i++, gp++)
621 if (vap->va_gid == *gp)
628 if ((vap->va_mode & ap->a_mode) == ap->a_mode)
635 * lookup. this is incredibly complicated in the
636 * general case, however for most pseudo-filesystems
637 * very little needs to be done.
639 * unless you want to get a migraine, just make sure your
640 * filesystem doesn't do any locking of its own. otherwise
641 * read and inwardly digest ufs_lookup().
645 struct vop_lookup_args /* {
646 struct vnode * a_dvp;
647 struct vnode ** a_vpp;
648 struct componentname * a_cnp;
651 struct componentname *cnp = ap->a_cnp;
652 struct vnode **vpp = ap->a_vpp;
653 struct vnode *dvp = ap->a_dvp;
654 char *pname = cnp->cn_nameptr;
655 struct proc_target *pt;
663 if (cnp->cn_nameiop == DELETE || cnp->cn_nameiop == RENAME ||
664 cnp->cn_nameiop == CREATE)
667 if (cnp->cn_namelen == 1 && *pname == '.') {
670 /* vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY, curp); */
675 switch (pfs->pfs_type) {
677 if (cnp->cn_flags & ISDOTDOT)
680 if (CNEQ(cnp, "self", 4))
681 return (linprocfs_allocvp(dvp->v_mount, vpp, 0, Pself));
682 if (CNEQ(cnp, "meminfo", 7))
683 return (linprocfs_allocvp(dvp->v_mount, vpp, 0, Pmeminfo));
684 if (CNEQ(cnp, "cpuinfo", 7))
685 return (linprocfs_allocvp(dvp->v_mount, vpp, 0, Pcpuinfo));
686 if (CNEQ(cnp, "stat", 4))
687 return (linprocfs_allocvp(dvp->v_mount, vpp, 0, Pstat));
688 if (CNEQ(cnp, "uptime", 6))
689 return (linprocfs_allocvp(dvp->v_mount, vpp, 0, Puptime));
690 if (CNEQ(cnp, "version", 7))
691 return (linprocfs_allocvp(dvp->v_mount, vpp, 0, Pversion));
692 if (CNEQ(cnp, "loadavg", 7))
693 return (linprocfs_allocvp(dvp->v_mount, vpp, 0, Ploadavg));
695 pid = atopid(pname, cnp->cn_namelen);
703 return (linprocfs_allocvp(dvp->v_mount, vpp, pid, Pproc));
706 if (cnp->cn_flags & ISDOTDOT)
707 return (linprocfs_root(dvp->v_mount, vpp));
709 p = PFIND(pfs->pfs_pid);
713 for (pt = proc_targets, i = 0; i < nproc_targets; pt++, i++) {
714 if (cnp->cn_namelen == pt->pt_namlen &&
715 bcmp(pt->pt_name, pname, cnp->cn_namelen) == 0 &&
716 (pt->pt_valid == NULL || (*pt->pt_valid)(p)))
722 return (linprocfs_allocvp(dvp->v_mount, vpp, pfs->pfs_pid,
729 return (cnp->cn_nameiop == LOOKUP ? ENOENT : EROFS);
733 * Does this process have a text file?
736 linprocfs_validfile(p)
740 return (procfs_findtextvp(p) != NULLVP);
744 * readdir() returns directory entries from pfsnode (vp).
746 * We generate just one directory entry at a time, as it would probably
747 * not pay off to buffer several entries locally to save uiomove calls.
750 linprocfs_readdir(ap)
751 struct vop_readdir_args /* {
754 struct ucred *a_cred;
760 struct uio *uio = ap->a_uio;
762 struct dirent *dp = &d;
764 int count, error, i, off;
769 d.d_namlen = PROCFS_NAMELEN;
770 delen = GENERIC_DIRSIZ(&d);
773 pfs = VTOPFS(ap->a_vp);
775 off = (int)uio->uio_offset;
776 if (off != uio->uio_offset || off < 0 ||
777 off % delen != 0 || uio->uio_resid < delen)
784 switch (pfs->pfs_type) {
786 * this is for the process-specific sub-directories.
787 * all that is needed to is copy out all the entries
788 * from the procent[] table (top of this file).
792 struct proc_target *pt;
794 p = PFIND(pfs->pfs_pid);
797 if (!PRISON_CHECK(ap->a_cred, p->p_ucred))
800 for (pt = &proc_targets[i];
801 uio->uio_resid >= delen && i < nproc_targets; pt++, i++) {
802 if (pt->pt_valid && (*pt->pt_valid)(p) == 0)
805 dp->d_reclen = delen;
806 dp->d_fileno = PROCFS_FILENO(pfs->pfs_pid, pt->pt_pfstype);
807 dp->d_namlen = pt->pt_namlen;
808 bcopy(pt->pt_name, dp->d_name, pt->pt_namlen + 1);
809 dp->d_type = pt->pt_type;
811 if ((error = uiomove((caddr_t)dp, delen, uio)) != 0)
819 * this is for the root of the procfs filesystem
820 * what is needed is a special entry for "self"
821 * followed by an entry for each process on allproc
832 struct proc *p = allproc.lh_first;
834 for (; p && uio->uio_resid >= delen; i++, pcnt++) {
835 bzero((char *) dp, delen);
836 dp->d_reclen = delen;
841 dp->d_fileno = PROCFS_FILENO(0, Proot);
842 dp->d_namlen = i + 1;
843 bcopy("..", dp->d_name, dp->d_namlen);
844 dp->d_name[i + 1] = '\0';
849 dp->d_fileno = PROCFS_FILENO(0, Pself);
851 bcopy("self", dp->d_name, 5);
856 dp->d_fileno = PROCFS_FILENO(0, Pmeminfo);
858 bcopy("meminfo", dp->d_name, 8);
863 dp->d_fileno = PROCFS_FILENO(0, Pcpuinfo);
865 bcopy("cpuinfo", dp->d_name, 8);
870 dp->d_fileno = PROCFS_FILENO(0, Pstat);
872 bcopy("stat", dp->d_name, 5);
877 dp->d_fileno = PROCFS_FILENO(0, Puptime);
879 bcopy("uptime", dp->d_name, 7);
884 dp->d_fileno = PROCFS_FILENO(0, Pversion);
886 bcopy("version", dp->d_name, 8);
891 dp->d_fileno = PROCFS_FILENO(0, Ploadavg);
893 bcopy("loadavg", dp->d_name, 8);
900 p = p->p_list.le_next;
903 if (!PRISON_CHECK(ap->a_cred, p->p_ucred))
907 while (!PRISON_CHECK(ap->a_cred, p->p_ucred)) {
908 p = p->p_list.le_next;
912 dp->d_fileno = PROCFS_FILENO(p->p_pid, Pproc);
913 dp->d_namlen = sprintf(dp->d_name, "%ld",
916 p = p->p_list.le_next;
920 if ((error = uiomove((caddr_t)dp, delen, uio)) != 0)
926 if (p == 0 && doingzomb == 0) {
928 p = zombproc.lh_first;
942 uio->uio_offset = i * delen;
948 * readlink reads the link of `self' or `exe'
951 linprocfs_readlink(ap)
952 struct vop_readlink_args *ap;
954 char buf[16]; /* should be enough */
956 struct vnode *vp = ap->a_vp;
957 struct pfsnode *pfs = VTOPFS(vp);
958 char *fullpath, *freepath;
961 switch (pfs->pfs_type) {
963 if (pfs->pfs_fileno != PROCFS_FILENO(0, Pself))
966 len = snprintf(buf, sizeof(buf), "%ld", (long)curproc->p_pid);
968 return (uiomove(buf, len, ap->a_uio));
970 * There _should_ be no way for an entire process to disappear
974 procp = PFIND(pfs->pfs_pid);
975 if (procp == NULL || procp->p_ucred == NULL) {
976 printf("linprocfs_readlink: pid %d disappeared\n",
978 return (uiomove("unknown", sizeof("unknown") - 1,
981 error = textvp_fullpath(procp, &fullpath, &freepath);
983 return (uiomove("unknown", sizeof("unknown") - 1,
985 error = uiomove(fullpath, strlen(fullpath), ap->a_uio);
986 free(freepath, M_TEMP);
994 * convert decimal ascii to pid_t
1005 if (c < '0' || c > '9')
1007 p = 10 * p + (c - '0');
1016 * procfs vnode operations.
1018 vop_t **linprocfs_vnodeop_p;
1019 static struct vnodeopv_entry_desc linprocfs_vnodeop_entries[] = {
1020 { &vop_default_desc, (vop_t *) vop_defaultop },
1021 { &vop_access_desc, (vop_t *) linprocfs_access },
1022 { &vop_advlock_desc, (vop_t *) linprocfs_badop },
1023 { &vop_bmap_desc, (vop_t *) linprocfs_bmap },
1024 { &vop_close_desc, (vop_t *) linprocfs_close },
1025 { &vop_create_desc, (vop_t *) linprocfs_badop },
1026 { &vop_getattr_desc, (vop_t *) linprocfs_getattr },
1027 { &vop_inactive_desc, (vop_t *) linprocfs_inactive },
1028 { &vop_link_desc, (vop_t *) linprocfs_badop },
1029 { &vop_lookup_desc, (vop_t *) linprocfs_lookup },
1030 { &vop_mkdir_desc, (vop_t *) linprocfs_badop },
1031 { &vop_mknod_desc, (vop_t *) linprocfs_badop },
1032 { &vop_open_desc, (vop_t *) linprocfs_open },
1033 { &vop_pathconf_desc, (vop_t *) vop_stdpathconf },
1034 { &vop_print_desc, (vop_t *) linprocfs_print },
1035 { &vop_read_desc, (vop_t *) linprocfs_rw },
1036 { &vop_readdir_desc, (vop_t *) linprocfs_readdir },
1037 { &vop_readlink_desc, (vop_t *) linprocfs_readlink },
1038 { &vop_reclaim_desc, (vop_t *) linprocfs_reclaim },
1039 { &vop_remove_desc, (vop_t *) linprocfs_badop },
1040 { &vop_rename_desc, (vop_t *) linprocfs_badop },
1041 { &vop_rmdir_desc, (vop_t *) linprocfs_badop },
1042 { &vop_setattr_desc, (vop_t *) linprocfs_setattr },
1043 { &vop_symlink_desc, (vop_t *) linprocfs_badop },
1044 { &vop_write_desc, (vop_t *) linprocfs_rw },
1045 { &vop_ioctl_desc, (vop_t *) linprocfs_ioctl },
1048 static struct vnodeopv_desc linprocfs_vnodeop_opv_desc =
1049 { &linprocfs_vnodeop_p, linprocfs_vnodeop_entries };
1051 VNODEOP_SET(linprocfs_vnodeop_opv_desc);