Function

vnode_getattr

Get vnode attributes.

Declaration

int vnode_getattr(vnode_t vp, struct vnode_attr *vap, vfs_context_t ctx);

Parameters

vp

The vnode whose attributes to grab.

vap

Structure containing: 1) A list of requested attributes 2) Space to indicate which attributes are supported and being returned 3) Space to return attributes.

ctx

Context for authentication.

Return Value

0 for success or an error code.

Discussion

Desired attributes are set with VATTR_SET_ACTIVE and VNODE_ATTR* macros. Supported attributes are determined after call with VATTR_IS_SUPPORTED.