summaryrefslogtreecommitdiff
path: root/sys/miscfs/union/union_vnops.c
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2001-12-04 22:44:33 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2001-12-04 22:44:33 +0000
commitf1bec1965343db9a80a80e7ed55ee2fe5dd36253 (patch)
tree079f5363174a8394c440390c31604f27f1101bc3 /sys/miscfs/union/union_vnops.c
parent2ae3b1f139f1a10569ee4341888c32f5a70281cb (diff)
Readd VOP_MMAP, will be used soon. Right now it's just a question to
the filesystem if we're allowed to mmap the file.
Diffstat (limited to 'sys/miscfs/union/union_vnops.c')
-rw-r--r--sys/miscfs/union/union_vnops.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/sys/miscfs/union/union_vnops.c b/sys/miscfs/union/union_vnops.c
index 54e4a2cae05..46f27a40e62 100644
--- a/sys/miscfs/union/union_vnops.c
+++ b/sys/miscfs/union/union_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: union_vnops.c,v 1.15 2001/07/26 20:46:29 millert Exp $ */
+/* $OpenBSD: union_vnops.c,v 1.16 2001/12/04 22:44:32 art Exp $ */
/* $NetBSD: union_vnops.c,v 1.30.4.1 1996/05/25 22:10:14 jtc Exp $ */
/*
@@ -94,6 +94,7 @@ int union_islocked __P((void *));
int union_pathconf __P((void *));
int union_advlock __P((void *));
int union_strategy __P((void *));
+int union_mmap __P((void *));
int (**union_vnodeop_p) __P((void *));
struct vnodeopv_entry_desc union_vnodeop_entries[] = {
@@ -133,7 +134,8 @@ struct vnodeopv_entry_desc union_vnodeop_entries[] = {
{ &vop_islocked_desc, union_islocked }, /* islocked */
{ &vop_pathconf_desc, union_pathconf }, /* pathconf */
{ &vop_advlock_desc, union_advlock }, /* advlock */
- { (struct vnodeop_desc*)NULL, (int(*) __P((void *)))NULL }
+ { &vop_mmap_desc, union_mmap },
+ { NULL, NULL }
};
struct vnodeopv_desc union_vnodeop_opv_desc =
{ &union_vnodeop_p, union_vnodeop_entries };
@@ -1842,3 +1844,13 @@ union_strategy(v)
return (error);
}
+int
+union_mmap(v)
+ void *v;
+{
+ struct vop_mmap_args *ap = v;
+ struct vnode *vp = OTHERVP(ap->a_vp);
+
+ ap->a_vp = vp;
+ return (VCALL(vp, VOFFSET(vop_mmap), ap));
+} \ No newline at end of file