summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-06-25 23:07:13 -0400
committerIan Moffett <ian@osmora.org>2024-06-25 23:07:13 -0400
commit6a6e374db6bbd47c54be7a9e552a2b54b5e4f928 (patch)
treeddeca5076b8416193dae2d8b81f88a41e71664e1 /sys/kern
parent648ee268cd47d72a8843238726c682c4bbef34fc (diff)
kernel: vfs: Add getattr vop
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/vfs_subr.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index e1eefaa..850961e 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -115,3 +115,16 @@ vfs_vop_read(struct vnode *vp, struct sio_txn *sio)
return vops->read(vp, sio);
}
+
+int
+vfs_vop_getattr(struct vnode *vp, struct vop_getattr_args *args)
+{
+ const struct vops *vops = vp->vops;
+
+ if (vops == NULL)
+ return -EIO;
+ if (vops->getattr == NULL)
+ return -EIO;
+
+ return vops->getattr(args);
+}