diff options
Diffstat (limited to 'src/sys/include/os/vnode.h')
-rw-r--r-- | src/sys/include/os/vnode.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/sys/include/os/vnode.h b/src/sys/include/os/vnode.h index 77459a1..868e137 100644 --- a/src/sys/include/os/vnode.h +++ b/src/sys/include/os/vnode.h @@ -87,6 +87,7 @@ struct vop_rw_data { struct vop { int(*lookup)(struct vop_lookup_args *args); ssize_t(*write)(struct vop_rw_data *data); + ssize_t(*read)(struct vop_rw_data *data); }; /* @@ -147,4 +148,16 @@ int vfs_vrel(struct vnode *vp, int flags); */ ssize_t vop_write(struct vnode *vp, char *data, size_t len); +/* + * Wrapper for the read write callback + * + * @vp: Vnode to read from + * @data: Read data written here + * @len: Length of bytes to read + * + * Returns the number of bytes read on success, otherwise + * a less than zero value on failure. + */ +ssize_t vop_read(struct vnode *vp, char *data, size_t len); + #endif /* !_OS_VNODE_H_ */ |