Home | History | Annotate | Line # | Download | only in ptyfs
ptyfs_vfsops.c revision 1.15
      1  1.15      elad /*	$NetBSD: ptyfs_vfsops.c,v 1.15 2006/05/14 21:31:52 elad Exp $	*/
      2   1.1  jdolecek 
      3   1.1  jdolecek /*
      4   1.1  jdolecek  * Copyright (c) 1992, 1993, 1995
      5   1.1  jdolecek  *	The Regents of the University of California.  All rights reserved.
      6   1.1  jdolecek  *
      7   1.1  jdolecek  * This code is derived from software donated to Berkeley by
      8   1.1  jdolecek  * Jan-Simon Pendry.
      9   1.1  jdolecek  *
     10   1.1  jdolecek  * Redistribution and use in source and binary forms, with or without
     11   1.1  jdolecek  * modification, are permitted provided that the following conditions
     12   1.1  jdolecek  * are met:
     13   1.1  jdolecek  * 1. Redistributions of source code must retain the above copyright
     14   1.1  jdolecek  *    notice, this list of conditions and the following disclaimer.
     15   1.1  jdolecek  * 2. Redistributions in binary form must reproduce the above copyright
     16   1.1  jdolecek  *    notice, this list of conditions and the following disclaimer in the
     17   1.1  jdolecek  *    documentation and/or other materials provided with the distribution.
     18   1.1  jdolecek  * 3. Neither the name of the University nor the names of its contributors
     19   1.1  jdolecek  *    may be used to endorse or promote products derived from this software
     20   1.1  jdolecek  *    without specific prior written permission.
     21   1.1  jdolecek  *
     22   1.1  jdolecek  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     23   1.1  jdolecek  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     24   1.1  jdolecek  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     25   1.1  jdolecek  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     26   1.1  jdolecek  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     27   1.1  jdolecek  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     28   1.1  jdolecek  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     29   1.1  jdolecek  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     30   1.1  jdolecek  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     31   1.1  jdolecek  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     32   1.1  jdolecek  * SUCH DAMAGE.
     33   1.1  jdolecek  *
     34   1.1  jdolecek  */
     35   1.1  jdolecek 
     36   1.1  jdolecek /*
     37   1.1  jdolecek  * Pseudo-tty Filesystem
     38   1.1  jdolecek  */
     39   1.1  jdolecek 
     40   1.1  jdolecek #include <sys/cdefs.h>
     41  1.15      elad __KERNEL_RCSID(0, "$NetBSD: ptyfs_vfsops.c,v 1.15 2006/05/14 21:31:52 elad Exp $");
     42   1.1  jdolecek 
     43   1.1  jdolecek #include <sys/param.h>
     44   1.1  jdolecek #include <sys/systm.h>
     45   1.1  jdolecek #include <sys/sysctl.h>
     46   1.1  jdolecek #include <sys/conf.h>
     47   1.1  jdolecek #include <sys/proc.h>
     48   1.1  jdolecek #include <sys/vnode.h>
     49   1.1  jdolecek #include <sys/mount.h>
     50   1.1  jdolecek #include <sys/namei.h>
     51   1.3  christos #include <sys/stat.h>
     52   1.1  jdolecek #include <sys/dirent.h>
     53   1.1  jdolecek #include <sys/malloc.h>
     54   1.1  jdolecek #include <sys/syslog.h>
     55   1.1  jdolecek #include <sys/select.h>
     56  1.13  christos #include <sys/filedesc.h>
     57   1.1  jdolecek #include <sys/tty.h>
     58   1.1  jdolecek #include <sys/pty.h>
     59  1.15      elad #include <sys/kauth.h>
     60   1.1  jdolecek 
     61   1.2  jdolecek #include <fs/ptyfs/ptyfs.h>
     62   1.1  jdolecek #include <miscfs/specfs/specdev.h>
     63   1.1  jdolecek 
     64   1.1  jdolecek MALLOC_DEFINE(M_PTYFSMNT, "ptyfs mount", "ptyfs mount structures");
     65   1.1  jdolecek 
     66   1.1  jdolecek void	ptyfs_init(void);
     67   1.1  jdolecek void	ptyfs_reinit(void);
     68   1.1  jdolecek void	ptyfs_done(void);
     69   1.1  jdolecek int	ptyfs_mount(struct mount *, const char *, void *, struct nameidata *,
     70  1.12  christos     struct lwp *);
     71  1.12  christos int	ptyfs_start(struct mount *, int, struct lwp *);
     72  1.12  christos int	ptyfs_unmount(struct mount *, int, struct lwp *);
     73  1.12  christos int	ptyfs_statvfs(struct mount *, struct statvfs *, struct lwp *);
     74  1.12  christos int	ptyfs_quotactl(struct mount *, int, uid_t, void *, struct lwp *);
     75  1.15      elad int	ptyfs_sync(struct mount *, int, kauth_cred_t, struct lwp *);
     76   1.1  jdolecek int	ptyfs_vget(struct mount *, ino_t, struct vnode **);
     77   1.1  jdolecek 
     78  1.12  christos static int ptyfs__allocvp(struct ptm_pty *, struct lwp *, struct vnode **,
     79   1.1  jdolecek     dev_t, char);
     80  1.13  christos static int ptyfs__makename(struct ptm_pty *, struct lwp *, char *, size_t,
     81  1.13  christos     dev_t, char);
     82   1.3  christos static void ptyfs__getvattr(struct ptm_pty *, struct proc *, struct vattr *);
     83   1.1  jdolecek 
     84   1.1  jdolecek /*
     85   1.1  jdolecek  * ptm glue: When we mount, we make ptm point to us.
     86   1.1  jdolecek  */
     87   1.1  jdolecek struct ptm_pty *ptyfs_save_ptm;
     88  1.11  christos static int ptyfs_count;
     89   1.1  jdolecek 
     90   1.1  jdolecek struct ptm_pty ptm_ptyfspty = {
     91   1.1  jdolecek 	ptyfs__allocvp,
     92   1.1  jdolecek 	ptyfs__makename,
     93   1.3  christos 	ptyfs__getvattr,
     94   1.1  jdolecek 	NULL
     95   1.1  jdolecek };
     96   1.1  jdolecek 
     97  1.13  christos static const char *
     98  1.13  christos ptyfs__getpath(struct lwp *l, const struct mount *mp)
     99  1.13  christos {
    100  1.13  christos 	struct cwdinfo *cwdi = l->l_proc->p_cwdi;
    101  1.13  christos 	char buf[sizeof(mp->mnt_stat.f_mntonname) + 32];
    102  1.13  christos 	size_t len;
    103  1.13  christos 	char *bp;
    104  1.13  christos 	int error;
    105  1.13  christos 
    106  1.13  christos 	if (cwdi->cwdi_rdir == NULL)
    107  1.13  christos 		return mp->mnt_stat.f_mntonname;
    108  1.13  christos 
    109  1.13  christos 	bp = buf + sizeof(buf);
    110  1.13  christos 	*--bp = '\0';
    111  1.13  christos 	error = getcwd_common(cwdi->cwdi_rdir, rootvnode, &bp,
    112  1.13  christos 	    buf, sizeof(buf) / 2, 0, l);
    113  1.13  christos 	if (error)	/* XXX */
    114  1.13  christos 		return mp->mnt_stat.f_mntonname;
    115  1.13  christos 
    116  1.13  christos 	len = strlen(bp);
    117  1.13  christos 	if (len >= sizeof(mp->mnt_stat.f_mntonname))	/* XXX */
    118  1.13  christos 		return mp->mnt_stat.f_mntonname;
    119  1.13  christos 	else
    120  1.13  christos 		return &mp->mnt_stat.f_mntonname[len];
    121  1.13  christos }
    122  1.13  christos 
    123   1.1  jdolecek static int
    124  1.13  christos ptyfs__makename(struct ptm_pty *pt, struct lwp *l, char *tbuf, size_t bufsiz,
    125  1.13  christos     dev_t dev, char ms)
    126   1.1  jdolecek {
    127   1.1  jdolecek 	struct mount *mp = pt->arg;
    128   1.1  jdolecek 	size_t len;
    129   1.1  jdolecek 
    130   1.1  jdolecek 	switch (ms) {
    131   1.1  jdolecek 	case 'p':
    132   1.1  jdolecek 		/* We don't provide access to the master, should we? */
    133   1.8  christos 		len = snprintf(tbuf, bufsiz, "/dev/null");
    134   1.1  jdolecek 		break;
    135   1.1  jdolecek 	case 't':
    136  1.13  christos 		len = snprintf(tbuf, bufsiz, "%s/%d", ptyfs__getpath(l, mp),
    137   1.1  jdolecek 		    minor(dev));
    138   1.1  jdolecek 		break;
    139   1.1  jdolecek 	default:
    140   1.1  jdolecek 		return EINVAL;
    141   1.1  jdolecek 	}
    142   1.1  jdolecek 
    143   1.1  jdolecek 	return len >= bufsiz ? ENOSPC : 0;
    144   1.1  jdolecek }
    145   1.1  jdolecek 
    146   1.3  christos 
    147   1.1  jdolecek static int
    148   1.1  jdolecek /*ARGSUSED*/
    149  1.12  christos ptyfs__allocvp(struct ptm_pty *pt, struct lwp *l, struct vnode **vpp,
    150   1.1  jdolecek     dev_t dev, char ms)
    151   1.1  jdolecek {
    152   1.1  jdolecek 	struct mount *mp = pt->arg;
    153   1.1  jdolecek 	ptyfstype type;
    154   1.1  jdolecek 
    155   1.1  jdolecek 	switch (ms) {
    156   1.1  jdolecek 	case 'p':
    157   1.1  jdolecek 		type = PTYFSptc;
    158   1.1  jdolecek 		break;
    159   1.1  jdolecek 	case 't':
    160   1.1  jdolecek 		type = PTYFSpts;
    161   1.1  jdolecek 		break;
    162   1.1  jdolecek 	default:
    163   1.1  jdolecek 		return EINVAL;
    164   1.1  jdolecek 	}
    165   1.1  jdolecek 
    166  1.12  christos 	return ptyfs_allocvp(mp, vpp, type, minor(dev), l);
    167   1.1  jdolecek }
    168   1.1  jdolecek 
    169   1.3  christos 
    170   1.3  christos static void
    171   1.3  christos ptyfs__getvattr(struct ptm_pty *pt, struct proc *p, struct vattr *vattr)
    172   1.3  christos {
    173   1.3  christos 	struct mount *mp = pt->arg;
    174   1.3  christos 	struct ptyfsmount *pmnt = VFSTOPTY(mp);
    175   1.3  christos 	VATTR_NULL(vattr);
    176   1.3  christos 	/* get real uid */
    177  1.15      elad 	vattr->va_uid = kauth_cred_getuid(p->p_cred);
    178   1.3  christos 	vattr->va_gid = pmnt->pmnt_gid;
    179   1.3  christos 	vattr->va_mode = pmnt->pmnt_mode;
    180   1.3  christos }
    181   1.3  christos 
    182   1.3  christos 
    183   1.1  jdolecek void
    184   1.1  jdolecek ptyfs_init(void)
    185   1.1  jdolecek {
    186   1.1  jdolecek #ifdef _LKM
    187   1.1  jdolecek 	malloc_type_attach(M_PTYFSMNT);
    188   1.1  jdolecek #endif
    189   1.1  jdolecek 	ptyfs_hashinit();
    190   1.1  jdolecek }
    191   1.1  jdolecek 
    192   1.1  jdolecek void
    193   1.1  jdolecek ptyfs_reinit(void)
    194   1.1  jdolecek {
    195   1.1  jdolecek 	ptyfs_hashreinit();
    196   1.1  jdolecek }
    197   1.1  jdolecek 
    198   1.1  jdolecek void
    199   1.1  jdolecek ptyfs_done(void)
    200   1.1  jdolecek {
    201   1.1  jdolecek #ifdef _LKM
    202   1.1  jdolecek 	malloc_type_detach(M_PTYFSMNT);
    203   1.1  jdolecek #endif
    204   1.1  jdolecek 	ptyfs_hashdone();
    205   1.1  jdolecek }
    206   1.1  jdolecek 
    207   1.1  jdolecek /*
    208   1.1  jdolecek  * Mount the Pseudo tty params filesystem
    209   1.1  jdolecek  */
    210   1.1  jdolecek int
    211   1.5     perry ptyfs_mount(struct mount *mp, const char *path, void *data,
    212  1.12  christos     struct nameidata *ndp, struct lwp *l)
    213   1.1  jdolecek {
    214   1.1  jdolecek 	int error = 0;
    215   1.3  christos 	struct ptyfsmount *pmnt;
    216   1.3  christos 	struct ptyfs_args args;
    217   1.1  jdolecek 
    218   1.1  jdolecek 	if (UIO_MX & (UIO_MX - 1)) {
    219   1.1  jdolecek 		log(LOG_ERR, "ptyfs: invalid directory entry size");
    220   1.1  jdolecek 		return EINVAL;
    221   1.1  jdolecek 	}
    222   1.1  jdolecek 
    223   1.3  christos 	if (mp->mnt_flag & MNT_GETARGS) {
    224   1.3  christos 		pmnt = VFSTOPTY(mp);
    225   1.3  christos 		if (pmnt == NULL)
    226   1.3  christos 			return EIO;
    227   1.3  christos 		args.version = PTYFS_ARGSVERSION;
    228   1.3  christos 		args.mode = pmnt->pmnt_mode;
    229   1.3  christos 		args.gid = pmnt->pmnt_gid;
    230   1.3  christos 		return copyout(&args, data, sizeof(args));
    231   1.3  christos 	}
    232   1.3  christos 
    233  1.14  christos 	/* Don't allow more than one mount */
    234  1.14  christos 	if (ptyfs_count)
    235  1.14  christos 		return EBUSY;
    236  1.14  christos 
    237   1.1  jdolecek 	if (mp->mnt_flag & MNT_UPDATE)
    238   1.1  jdolecek 		return EOPNOTSUPP;
    239   1.1  jdolecek 
    240   1.3  christos 	if (data != NULL) {
    241   1.3  christos 		error = copyin(data, &args, sizeof args);
    242   1.3  christos 		if (error != 0)
    243   1.3  christos 			return error;
    244   1.3  christos 
    245   1.3  christos 		if (args.version != PTYFS_ARGSVERSION)
    246   1.3  christos 			return EINVAL;
    247   1.3  christos 	} else {
    248   1.7  christos 		/*
    249   1.7  christos 		 * Arguments are mandatory.
    250   1.7  christos 		 */
    251   1.7  christos 		return EINVAL;
    252   1.3  christos 	}
    253   1.3  christos 
    254   1.5     perry 	pmnt = malloc(sizeof(struct ptyfsmount), M_UFSMNT, M_WAITOK);
    255   1.3  christos 
    256   1.3  christos 	mp->mnt_data = pmnt;
    257   1.3  christos 	pmnt->pmnt_gid = args.gid;
    258   1.3  christos 	pmnt->pmnt_mode = args.mode;
    259   1.1  jdolecek 	mp->mnt_flag |= MNT_LOCAL;
    260   1.1  jdolecek 	vfs_getnewfsid(mp);
    261   1.1  jdolecek 
    262   1.1  jdolecek 	if ((error = set_statvfs_info(path, UIO_USERSPACE, "ptyfs",
    263  1.12  christos 	    UIO_SYSSPACE, mp, l)) != 0) {
    264  1.10  christos 		free(pmnt, M_UFSMNT);
    265   1.1  jdolecek 		return error;
    266   1.1  jdolecek 	}
    267   1.1  jdolecek 
    268   1.1  jdolecek 	/* Point pty access to us */
    269   1.1  jdolecek 
    270   1.1  jdolecek 	ptm_ptyfspty.arg = mp;
    271   1.1  jdolecek 	ptyfs_save_ptm = pty_sethandler(&ptm_ptyfspty);
    272  1.11  christos 	ptyfs_count++;
    273   1.1  jdolecek 	return 0;
    274   1.1  jdolecek }
    275   1.1  jdolecek 
    276   1.1  jdolecek /*ARGSUSED*/
    277   1.1  jdolecek int
    278  1.12  christos ptyfs_start(struct mount *mp, int flags, struct lwp *p)
    279   1.1  jdolecek {
    280   1.1  jdolecek 	return 0;
    281   1.1  jdolecek }
    282   1.1  jdolecek 
    283   1.1  jdolecek /*ARGSUSED*/
    284   1.1  jdolecek int
    285  1.12  christos ptyfs_unmount(struct mount *mp, int mntflags, struct lwp *p)
    286   1.1  jdolecek {
    287   1.1  jdolecek 	int error;
    288   1.1  jdolecek 	int flags = 0;
    289   1.1  jdolecek 
    290   1.1  jdolecek 	if (mntflags & MNT_FORCE)
    291   1.1  jdolecek 		flags |= FORCECLOSE;
    292   1.1  jdolecek 
    293   1.1  jdolecek 	if ((error = vflush(mp, 0, flags)) != 0)
    294   1.1  jdolecek 		return (error);
    295   1.1  jdolecek 
    296   1.1  jdolecek 	/* Restore where pty access was pointing */
    297   1.1  jdolecek 	(void)pty_sethandler(ptyfs_save_ptm);
    298   1.1  jdolecek 	ptyfs_save_ptm = NULL;
    299  1.10  christos 	ptm_ptyfspty.arg = NULL;
    300   1.3  christos 
    301   1.1  jdolecek 	/*
    302   1.3  christos 	 * Finally, throw away the ptyfsmount structure
    303   1.1  jdolecek 	 */
    304   1.3  christos 	free(mp->mnt_data, M_UFSMNT);
    305   1.5     perry 	mp->mnt_data = 0;
    306  1.11  christos 	ptyfs_count--;
    307   1.3  christos 
    308   1.1  jdolecek 	return 0;
    309   1.1  jdolecek }
    310   1.1  jdolecek 
    311   1.1  jdolecek int
    312   1.1  jdolecek ptyfs_root(struct mount *mp, struct vnode **vpp)
    313   1.1  jdolecek {
    314   1.1  jdolecek 	/* setup "." */
    315   1.1  jdolecek 	return ptyfs_allocvp(mp, vpp, PTYFSroot, 0, NULL);
    316   1.1  jdolecek }
    317   1.1  jdolecek 
    318   1.1  jdolecek /*ARGSUSED*/
    319   1.1  jdolecek int
    320  1.12  christos ptyfs_quotactl(struct mount *mp, int cmd, uid_t uid, void *arg, struct lwp *p)
    321   1.1  jdolecek {
    322   1.1  jdolecek 	return EOPNOTSUPP;
    323   1.1  jdolecek }
    324   1.1  jdolecek 
    325   1.1  jdolecek /*ARGSUSED*/
    326   1.1  jdolecek int
    327  1.12  christos ptyfs_statvfs(struct mount *mp, struct statvfs *sbp, struct lwp *p)
    328   1.1  jdolecek {
    329   1.1  jdolecek 	sbp->f_bsize = DEV_BSIZE;
    330   1.1  jdolecek 	sbp->f_frsize = DEV_BSIZE;
    331   1.1  jdolecek 	sbp->f_iosize = DEV_BSIZE;
    332   1.1  jdolecek 	sbp->f_blocks = 2;		/* 1K to keep df happy */
    333   1.1  jdolecek 	sbp->f_bfree = 0;
    334   1.1  jdolecek 	sbp->f_bavail = 0;
    335   1.1  jdolecek 	sbp->f_bresvd = 0;
    336   1.1  jdolecek 	sbp->f_files = 1024;	/* XXX lie */
    337   1.1  jdolecek 	sbp->f_ffree = 128;	/* XXX lie */
    338   1.1  jdolecek 	sbp->f_favail = 128;	/* XXX lie */
    339   1.1  jdolecek 	sbp->f_fresvd = 0;
    340   1.1  jdolecek 	sbp->f_namemax = MAXNAMLEN;
    341   1.1  jdolecek 	copy_statvfs_info(sbp, mp);
    342   1.1  jdolecek 	return 0;
    343   1.1  jdolecek }
    344   1.1  jdolecek 
    345   1.1  jdolecek /*ARGSUSED*/
    346   1.1  jdolecek int
    347  1.15      elad ptyfs_sync(struct mount *mp, int waitfor, kauth_cred_t uc, struct lwp *p)
    348   1.1  jdolecek {
    349   1.1  jdolecek 	return 0;
    350   1.1  jdolecek }
    351   1.1  jdolecek 
    352   1.1  jdolecek /*
    353   1.1  jdolecek  * Kernfs flat namespace lookup.
    354   1.1  jdolecek  * Currently unsupported.
    355   1.1  jdolecek  */
    356   1.1  jdolecek /*ARGSUSED*/
    357   1.1  jdolecek int
    358   1.1  jdolecek ptyfs_vget(struct mount *mp, ino_t ino, struct vnode **vpp)
    359   1.1  jdolecek {
    360   1.1  jdolecek 	return EOPNOTSUPP;
    361   1.1  jdolecek }
    362   1.1  jdolecek 
    363   1.1  jdolecek SYSCTL_SETUP(sysctl_vfs_ptyfs_setup, "sysctl vfs.ptyfs subtree setup")
    364   1.1  jdolecek {
    365   1.1  jdolecek 
    366   1.1  jdolecek 	sysctl_createv(clog, 0, NULL, NULL,
    367   1.1  jdolecek 		       CTLFLAG_PERMANENT,
    368   1.1  jdolecek 		       CTLTYPE_NODE, "vfs", NULL,
    369   1.1  jdolecek 		       NULL, 0, NULL, 0,
    370   1.1  jdolecek 		       CTL_VFS, CTL_EOL);
    371   1.1  jdolecek 	sysctl_createv(clog, 0, NULL, NULL,
    372   1.1  jdolecek 		       CTLFLAG_PERMANENT,
    373   1.1  jdolecek 		       CTLTYPE_NODE, "ptyfs",
    374   1.1  jdolecek 		       SYSCTL_DESCR("Pty file system"),
    375   1.1  jdolecek 		       NULL, 0, NULL, 0,
    376   1.1  jdolecek 		       CTL_VFS, 23, CTL_EOL);
    377   1.1  jdolecek 	/*
    378   1.1  jdolecek 	 * XXX the "23" above could be dynamic, thereby eliminating
    379   1.1  jdolecek 	 * one more instance of the "number to vfs" mapping problem,
    380   1.1  jdolecek 	 * but "23" is the order as taken from sys/mount.h
    381   1.1  jdolecek 	 */
    382   1.1  jdolecek }
    383   1.1  jdolecek 
    384   1.1  jdolecek 
    385   1.1  jdolecek extern const struct vnodeopv_desc ptyfs_vnodeop_opv_desc;
    386   1.1  jdolecek 
    387   1.1  jdolecek const struct vnodeopv_desc * const ptyfs_vnodeopv_descs[] = {
    388   1.1  jdolecek 	&ptyfs_vnodeop_opv_desc,
    389   1.1  jdolecek 	NULL,
    390   1.1  jdolecek };
    391   1.1  jdolecek 
    392   1.1  jdolecek struct vfsops ptyfs_vfsops = {
    393   1.1  jdolecek 	MOUNT_PTYFS,
    394   1.1  jdolecek 	ptyfs_mount,
    395   1.1  jdolecek 	ptyfs_start,
    396   1.1  jdolecek 	ptyfs_unmount,
    397   1.1  jdolecek 	ptyfs_root,
    398   1.1  jdolecek 	ptyfs_quotactl,
    399   1.1  jdolecek 	ptyfs_statvfs,
    400   1.1  jdolecek 	ptyfs_sync,
    401   1.1  jdolecek 	ptyfs_vget,
    402   1.9      jmmv 	NULL,				/* vfs_fhtovp */
    403   1.9      jmmv 	NULL,				/* vfs_vptofp */
    404   1.1  jdolecek 	ptyfs_init,
    405   1.1  jdolecek 	ptyfs_reinit,
    406   1.1  jdolecek 	ptyfs_done,
    407   1.1  jdolecek 	NULL,				/* vfs_mountroot */
    408   1.1  jdolecek 	(int (*)(struct mount *, struct vnode *, struct timespec *))eopnotsupp,
    409   1.4  christos 	(int (*)(struct mount *, int, struct vnode *, int, const char *,
    410  1.12  christos 	    struct lwp *))eopnotsupp,
    411   1.1  jdolecek 	ptyfs_vnodeopv_descs,
    412   1.1  jdolecek };
    413   1.6   thorpej VFS_ATTACH(ptyfs_vfsops);
    414