vnop_finfo Entry Point

Purpose

Returns information about a file.

Syntax

int vnop_finfo (vp, cmd, bufp, length, crp) struct vnode *vp; int cmd; void *bufp; int length; struct ucred *crp;

Parameters

Item Description
vp Points to the vnode to be queried.
cmd Specifies the command parameter.
bufp Points to the buffer for the information.
length Specifies the length of the buffer.
crp Specifies user's credentials.

Description

The vnop_finfo entry point is used to query a file system. It is used primarily to implement the pathconf and fpathconf subroutines. The command parameter defines what type of query is being done. The query commands and the associated data structures are defined in <sys/finfo.h>. If the file system does not support the particular query, it should return ENOSYS.

File systems that do not define GFS_VERSION421 in their gfs flags do not need to supply a vnop_finfo entry point. If the command is FI_PATHCONF, then the logical file system returns generic pathconf information. If the query is other than FI_PATHCONF, then the request fails with EINVAL.

Execution Environment

The vnop_finfo entry point can be called from the process environment only.

Return Values

Item Description
Zero Indicates a successful operation.
Nonzero Indicates that the operation failed; return values should be chosen from the /usr/include/sys/errno.h file.