diff options
author | Ian Moffett <ian@osmora.org> | 2025-10-15 13:43:39 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2025-10-15 13:43:39 -0400 |
commit | 67be54fb64cfcd63dfe3638c507aa7f29bd86ec5 (patch) | |
tree | e47bbbafd3771668c6131b6cff1e1ccc6e409727 /src/sys/include/os/vnode.h | |
parent | 8e3ae060c046446a98a3f9e94a4ebe11e34a2803 (diff) |
kern: vfs: Make vnode r/w operations offset aware
Adds offset handling to the vnode read and write callbacks.
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'src/sys/include/os/vnode.h')
-rw-r--r-- | src/sys/include/os/vnode.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/sys/include/os/vnode.h b/src/sys/include/os/vnode.h index 868e137..9054a55 100644 --- a/src/sys/include/os/vnode.h +++ b/src/sys/include/os/vnode.h @@ -72,11 +72,13 @@ struct vop_lookup_args { * * @data: Buffer containing I/O data * @len: Length of buffer + * @off: Offset of operation * @vp: Current vnode */ struct vop_rw_data { void *data; size_t len; + off_t off; struct vnode *vp; }; @@ -141,23 +143,25 @@ int vfs_vrel(struct vnode *vp, int flags); * * @vp: Vnode to write to * @data: Data to write + * @off: Offset to write at * @len: Length of bytes to write * * Returns the number of bytes written on success, otherwise * a less than zero value on failure. */ -ssize_t vop_write(struct vnode *vp, char *data, size_t len); +ssize_t vop_write(struct vnode *vp, char *data, off_t off, size_t len); /* * Wrapper for the read write callback * * @vp: Vnode to read from * @data: Read data written here + * @off: Offset to read at * @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); +ssize_t vop_read(struct vnode *vp, char *data, off_t off, size_t len); #endif /* !_OS_VNODE_H_ */ |