diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2001-12-04 22:44:33 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2001-12-04 22:44:33 +0000 |
commit | f1bec1965343db9a80a80e7ed55ee2fe5dd36253 (patch) | |
tree | 079f5363174a8394c440390c31604f27f1101bc3 /sys/kern/vnode_if.c | |
parent | 2ae3b1f139f1a10569ee4341888c32f5a70281cb (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/kern/vnode_if.c')
-rw-r--r-- | sys/kern/vnode_if.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/sys/kern/vnode_if.c b/sys/kern/vnode_if.c index 986936fc8b6..6ef2712d257 100644 --- a/sys/kern/vnode_if.c +++ b/sys/kern/vnode_if.c @@ -1364,6 +1364,37 @@ int VOP_SIZE(vp, size, eobp) return (VCALL(vp, VOFFSET(vop_size), &a)); } +int vop_mmap_vp_offsets[] = { + VOPARG_OFFSETOF(struct vop_mmap_args,a_vp), + VDESC_NO_OFFSET +}; +struct vnodeop_desc vop_mmap_desc = { + 0, + "vop_mmap", + 0, + vop_mmap_vp_offsets, + VDESC_NO_OFFSET, + VOPARG_OFFSETOF(struct vop_mmap_args, a_cred), + VOPARG_OFFSETOF(struct vop_mmap_args, a_p), + VDESC_NO_OFFSET, + NULL, +}; + +int VOP_MMAP(vp, fflags, cred, p) + struct vnode *vp; + int fflags; + struct ucred *cred; + struct proc *p; +{ + struct vop_mmap_args a; + a.a_desc = VDESC(vop_mmap); + a.a_vp = vp; + a.a_fflags = fflags; + a.a_cred = cred; + a.a_p = p; + return (VCALL(vp, VOFFSET(vop_mmap), &a)); +} + /* Special cases: */ int vop_strategy_vp_offsets[] = { @@ -1461,6 +1492,7 @@ struct vnodeop_desc *vfs_op_descs[] = { &vop_getpages_desc, &vop_putpages_desc, &vop_size_desc, + &vop_mmap_desc, NULL }; |