Gets the attributes of a file.
int vn_getattr (vp, vap, crp) struct vnode *vp; struct vattr *vap; struct ucred *crp;
vp | Specifies the virtual node (v-node) of the file system object. |
vap | Points to a vattr structure. |
crp | Points to the cred structure. This structure contains data that the file system can use to validate access permission. |
The vn_getattr entry point is called by the logical file system to retrieve information about a file. The vattr structure indicated by the vap parameter contains all the relevant attributes of the file. The vattr structure is defined in the /usr/include/sys/vattr.h file. This entry point is used to implement the stat, fstat, and lstat subroutines.
Note: The indicated v-node is held for the duration of the vn_getattr subroutine.
The vn_getattr entry point can be called from the process environment only.
0 | Indicates success. |
Nonzero return values are returned from the /usr/include/sys/errno.h file to indicate failure.
The statx subroutine.
Virtual File System Overview, Virtual File System Kernel Extensions Overview, Logical File System Overview, Understanding Virtual Nodes (V-nodes) in AIX Kernel Extensions and Device Support Programming Concepts.