summaryrefslogtreecommitdiffstats
path: root/sys/miscfs/procfs/procfs_vfsops.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>1997-10-06 20:19:26 +0000
committerderaadt <deraadt@openbsd.org>1997-10-06 20:19:26 +0000
commitf6d35f956ac60c4dbcc91b018b2bcefd71ad933f (patch)
tree918af077b7c363fb7d19243c4ecb7f0165b3bc65 /sys/miscfs/procfs/procfs_vfsops.c
parentBuild generic and genericsbc kernels into snapshot and distribute them (diff)
downloadwireguard-openbsd-f6d35f956ac60c4dbcc91b018b2bcefd71ad933f.tar.xz
wireguard-openbsd-f6d35f956ac60c4dbcc91b018b2bcefd71ad933f.zip
back out vfs lite2 till after 2.2
Diffstat (limited to 'sys/miscfs/procfs/procfs_vfsops.c')
-rw-r--r--sys/miscfs/procfs/procfs_vfsops.c83
1 files changed, 68 insertions, 15 deletions
diff --git a/sys/miscfs/procfs/procfs_vfsops.c b/sys/miscfs/procfs/procfs_vfsops.c
index a9e6c99aae7..c2c31b37595 100644
--- a/sys/miscfs/procfs/procfs_vfsops.c
+++ b/sys/miscfs/procfs/procfs_vfsops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: procfs_vfsops.c,v 1.5 1997/10/06 15:19:11 csapuntz Exp $ */
+/* $OpenBSD: procfs_vfsops.c,v 1.6 1997/10/06 20:20:34 deraadt Exp $ */
/* $NetBSD: procfs_vfsops.c,v 1.25 1996/02/09 22:40:53 christos Exp $ */
/*
@@ -61,7 +61,14 @@ int procfs_mount __P((struct mount *, char *, caddr_t,
struct nameidata *, struct proc *));
int procfs_start __P((struct mount *, int, struct proc *));
int procfs_unmount __P((struct mount *, int, struct proc *));
+int procfs_quotactl __P((struct mount *, int, uid_t, caddr_t,
+ struct proc *));
int procfs_statfs __P((struct mount *, struct statfs *, struct proc *));
+int procfs_sync __P((struct mount *, int, struct ucred *, struct proc *));
+int procfs_vget __P((struct mount *, ino_t, struct vnode **));
+int procfs_fhtovp __P((struct mount *, struct fid *, struct mbuf *,
+ struct vnode **, int *, struct ucred **));
+int procfs_vptofh __P((struct vnode *, struct fid *));
/*
* VFS Operations.
*
@@ -88,7 +95,7 @@ procfs_mount(mp, path, data, ndp, p)
mp->mnt_flag |= MNT_LOCAL;
mp->mnt_data = 0;
- vfs_getnewfsid(mp);
+ getnewfsid(mp, makefstype(MOUNT_PROCFS));
(void) copyinstr(path, mp->mnt_stat.f_mntonname, MNAMELEN, &size);
bzero(mp->mnt_stat.f_mntonname + size, MNAMELEN - size);
@@ -172,25 +179,72 @@ procfs_statfs(mp, sbp, p)
bcopy(mp->mnt_stat.f_mntonname, sbp->f_mntonname, MNAMELEN);
bcopy(mp->mnt_stat.f_mntfromname, sbp->f_mntfromname, MNAMELEN);
}
- strncpy(sbp->f_fstypename, mp->mnt_vfc->vfc_name, MFSNAMELEN);
+ strncpy(sbp->f_fstypename, mp->mnt_op->vfs_name, MFSNAMELEN);
return (0);
}
+/*ARGSUSED*/
+int
+procfs_quotactl(mp, cmds, uid, arg, p)
+ struct mount *mp;
+ int cmds;
+ uid_t uid;
+ caddr_t arg;
+ struct proc *p;
+{
+
+ return (EOPNOTSUPP);
+}
+
+/*ARGSUSED*/
+int
+procfs_sync(mp, waitfor, uc, p)
+ struct mount *mp;
+ int waitfor;
+ struct ucred *uc;
+ struct proc *p;
+{
-#define procfs_sync ((int (*) __P((struct mount *, int, struct ucred *, \
- struct proc *)))nullop)
+ return (0);
+}
-#define procfs_fhtovp ((int (*) __P((struct mount *, struct fid *, \
- struct mbuf *, struct vnode **, int *, struct ucred **)))eopnotsupp)
-#define procfs_quotactl ((int (*) __P((struct mount *, int, uid_t, caddr_t, \
- struct proc *)))eopnotsupp)
-#define procfs_sysctl ((int (*) __P((int *, u_int, void *, size_t *, void *, \
- size_t, struct proc *)))eopnotsupp)
-#define procfs_vget ((int (*) __P((struct mount *, ino_t, struct vnode **))) \
- eopnotsupp)
-#define procfs_vptofh ((int (*) __P((struct vnode *, struct fid *)))eopnotsupp)
+/*ARGSUSED*/
+int
+procfs_vget(mp, ino, vpp)
+ struct mount *mp;
+ ino_t ino;
+ struct vnode **vpp;
+{
+
+ return (EOPNOTSUPP);
+}
+
+/*ARGSUSED*/
+int
+procfs_fhtovp(mp, fhp, mb, vpp, what, anon)
+ struct mount *mp;
+ struct fid *fhp;
+ struct mbuf *mb;
+ struct vnode **vpp;
+ int *what;
+ struct ucred **anon;
+{
+
+ return (EINVAL);
+}
+
+/*ARGSUSED*/
+int
+procfs_vptofh(vp, fhp)
+ struct vnode *vp;
+ struct fid *fhp;
+{
+
+ return (EINVAL);
+}
struct vfsops procfs_vfsops = {
+ MOUNT_PROCFS,
procfs_mount,
procfs_start,
procfs_unmount,
@@ -202,5 +256,4 @@ struct vfsops procfs_vfsops = {
procfs_fhtovp,
procfs_vptofh,
procfs_init,
- procfs_sysctl
};