int vn_rdwr (vp, op, flags, uiop, ext, vinfo, vattrp, crp) struct vnode *vp; enum uio_rw op; int flags; struct uio *uiop; int ext; caddr_t vinfo; struct vattr *vattrp; struct ucred *crp;
vp | Points to the virtual node (v-node) of the file. |
op | Specifies a number that indicates a read or write operation. This parameter has a value of either UIO_READ or UIO_WRITE. These values are found in the /usr/include/sys/uio.h file. |
flags | Identifies flags from the open file structure. |
uiop | Points to a uio structure. This structure describes the count, data buffer, and other I/O information. |
ext | Provides an extension for special purposes. Its use and meaning are specific to virtual file systems, and it is usually ignored except for devices. |
vinfo | This parameter is currently not used. |
The vn_rdwr entry point is used to request that data be read or written from an object represented by a v-node. The vn_rdwr entry point does the indicated data transfer and sets the number of bytes not transferred in the uio_resid field. This field is 0 (zero) on successful completion.
The vn_rdwr entry point can be called from the process environment only.
Nonzero return values are returned from the /usr/include/sys/errno.h file to indicate failure. The vn_rdwr entry point returns an error code if an operation did not transfer all the data requested. The only exception is if an end of file is reached on a read request. In this case, the operation still returns 0.
The vn_create entry point, vn_open entry point.
The read subroutine, write subroutine.
The uio structure.
Virtual File System Overview, Logical File System Overview, Understanding Virtual Nodes (V-nodes), and Virtual File System Kernel Extensions Overview in AIX Kernel Extensions and Device Support Programming Concepts.
List of Virtual File System Operations.