[ Previous | Next | Contents | Home | Search ]
AIX Version 4.3 Kernel and Subsystems Technical Reference, Volume 1

vn_seek Entry Point

Purpose

Validates file offsets.

Syntax

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

Parameters

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 vn_seek Entry Point applies to Version 4.2 and later releases.

The vn_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 vn_seek entry point will have a maximum offset of OFF_MAX (2 gigabytes minus 1) enforced by the logical file system.

Execution Environment

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

Return Values

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

Related Information

The lseek, llseek, and, lseek64 subroutines.

The Large File Enabled Programming Environment Overview.


[ Previous | Next | Contents | Home | Search ]