vnop_seek Entry Point

Purpose

Validates file offsets.

Syntax

int vnop_seek (vp, offsetp, crp)
struct vnode * vp;
offset_t * offp;
struct ucred * crp;

Parameters

Item Description
vp Points to the virtual node (v-node) of the file.
offp Points to the location of the new offset to validate.
crp Points to the user's credential.

Description

Note: The vnop_seek Entry Point applies to AIX® 4.2 and later releases.

The vnop_seek entry point is called by the logical file system to validate a new offset that has been computed by the lseek, llseek, and lseek64 subroutines. The file system implementation should check the offset pointed to by offp and if it is acceptable for the file, return zero. If the offset is not acceptable, the routine should return a non-zero value. EINVAL is the suggested error value for invalid offsets.

File systems which do not wish to do offset validation can simply return 0. File systems which do not provide the vnop_seek entry point will have a maximum offset of OFF_MAX (2 gigabytes minus 1) enforced by the logical file system.

Execution Environment

The vnop_seek entry point is be called from the process environment only.

Return Values

Item Description
0 Indicates success.
Nonzero Return values are returned the /usr/include/sys/errno.h file to indicate failure.