aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/vfs_subr.c
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-05-19 23:05:21 -0400
committerIan Moffett <ian@osmora.org>2024-05-19 23:05:21 -0400
commit673753e8befcfbb575380ed0d23fc6741b4e50a0 (patch)
tree087ef9499c52523601b8d95d74eec709885a0899 /sys/kern/vfs_subr.c
parentf9a6fc6f474ced84a78df50e2b105bd7da052d06 (diff)
kernel: vfs: Add support for open hook
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/kern/vfs_subr.c')
-rw-r--r--sys/kern/vfs_subr.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index 5b31057..f760831 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -239,3 +239,11 @@ vfs_getattr(struct vnode *vp, struct vattr *vattr)
{
return vp->vops->getattr(vp, vattr);
}
+
+int vfs_open(struct vnode *vp)
+{
+ if (vp->vops->open == NULL)
+ return -EIO;
+
+ return vp->vops->open(vp);
+}