diff options
author | Ian Moffett <ian@osmora.org> | 2025-02-22 02:18:33 -0500 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2025-02-22 02:20:12 -0500 |
commit | d68537c1ca22d58f1c219d970d5aa462df9e0c6b (patch) | |
tree | 375e9f1a9feb249f39754a8df38f5fdfe4430b85 /sys/kern/vfs_subr.c | |
parent | 2f7f296f8e7eae3944bc34e9dfe51a262b7f7149 (diff) |
kernel: vfs: Add support for write()
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/kern/vfs_subr.c')
-rw-r--r-- | sys/kern/vfs_subr.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index f67bcfe..da0a4f9 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -167,6 +167,19 @@ vfs_vop_read(struct vnode *vp, struct sio_txn *sio) } int +vfs_vop_write(struct vnode *vp, struct sio_txn *sio) +{ + const struct vops *vops = vp->vops; + + if (vops == NULL) + return -EIO; + if (vops->write == NULL) + return -EIO; + + return vops->write(vp, sio); +} + +int vfs_vop_getattr(struct vnode *vp, struct vop_getattr_args *args) { const struct vops *vops = vp->vops; |