summaryrefslogtreecommitdiffstats
path: root/sys/miscfs/procfs/procfs_subr.c
diff options
context:
space:
mode:
authorthib <thib@openbsd.org>2010-09-06 23:44:10 +0000
committerthib <thib@openbsd.org>2010-09-06 23:44:10 +0000
commit57593ff0414b90ebf400de19b45bbeaee8108cfb (patch)
tree13b193c37171e2c724599f8763f09db45d6275b8 /sys/miscfs/procfs/procfs_subr.c
parentAll PWR_{SUSPEND,RESUME} can now be replaced by DVACT_{SUSPEND,RESUME} (diff)
downloadwireguard-openbsd-57593ff0414b90ebf400de19b45bbeaee8108cfb.tar.xz
wireguard-openbsd-57593ff0414b90ebf400de19b45bbeaee8108cfb.zip
End the VOP experiment. Instead of the ridicolusly complicated operation
vector setup that has questionable features (that have, as far as I can tell never been used in practice, atleast not in OpenBSD), remove all the gunk and favor a simple struct full of function pointers that get set directly by each of the filesystems. Removes gobs of ugly code and makes things simpler by a magnitude. The only downside of this is that we loose the vnoperate feature so the spec/fifo operations of the filesystems need to be kept in sync with specfs and fifofs, this is no big deal as the API it self is pretty static. Many thanks to armani@ who pulled an earlier version of this diff to current after c2k10 and Gabriel Kihlman on tech@ for testing. Liked by many. "come on, find your balls" deraadt@.
Diffstat (limited to 'sys/miscfs/procfs/procfs_subr.c')
-rw-r--r--sys/miscfs/procfs/procfs_subr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/miscfs/procfs/procfs_subr.c b/sys/miscfs/procfs/procfs_subr.c
index 9bbe103393b..e57ed21d404 100644
--- a/sys/miscfs/procfs/procfs_subr.c
+++ b/sys/miscfs/procfs/procfs_subr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: procfs_subr.c,v 1.31 2009/08/10 14:55:11 oga Exp $ */
+/* $OpenBSD: procfs_subr.c,v 1.32 2010/09/06 23:44:10 thib Exp $ */
/* $NetBSD: procfs_subr.c,v 1.15 1996/02/12 15:01:42 christos Exp $ */
/*
@@ -111,7 +111,7 @@ loop:
}
}
- if ((error = getnewvnode(VT_PROCFS, mp, procfs_vnodeop_p, vpp)) != 0)
+ if ((error = getnewvnode(VT_PROCFS, mp, &procfs_vops, vpp)) != 0)
goto out;
vp = *vpp;