summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_default.c
diff options
context:
space:
mode:
authorthib <thib@openbsd.org>2008-05-03 14:41:29 +0000
committerthib <thib@openbsd.org>2008-05-03 14:41:29 +0000
commitcff1838ed3466bb19f493ac688485a92a618552b (patch)
treeea96ddced1741a37d8de77beb2e1ff5168e3d3bd /sys/kern/vfs_default.c
parentremove unused functions (diff)
downloadwireguard-openbsd-cff1838ed3466bb19f493ac688485a92a618552b.tar.xz
wireguard-openbsd-cff1838ed3466bb19f493ac688485a92a618552b.zip
Introduce vop_generic_bmap(); use it where applicable.
one thing of note, fifofs changes in that its bmap now sets the runp too 0, but that was an oversight in the old code. ok art@
Diffstat (limited to 'sys/kern/vfs_default.c')
-rw-r--r--sys/kern/vfs_default.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/sys/kern/vfs_default.c b/sys/kern/vfs_default.c
index 58361bc9f58..32527afcdb7 100644
--- a/sys/kern/vfs_default.c
+++ b/sys/kern/vfs_default.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_default.c,v 1.36 2007/12/27 13:59:12 thib Exp $ */
+/* $OpenBSD: vfs_default.c,v 1.37 2008/05/03 14:41:29 thib Exp $ */
/*
* Portions of this code are:
@@ -121,6 +121,21 @@ vop_generic_revoke(void *v)
}
int
+vop_generic_bmap(void *v)
+{
+ struct vop_bmap_args *ap = v;
+
+ if (ap->a_vpp)
+ *ap->a_vpp = ap->a_vp;
+ if (ap->a_bnp)
+ *ap->a_bnp = ap->a_bn;
+ if (ap->a_runp)
+ *ap->a_runp = 0;
+
+ return (0);
+}
+
+int
vop_generic_bwrite(void *v)
{
struct vop_bwrite_args *ap = v;