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

fp_lseek, fp_llseek Kernel Service

Purpose

Changes the current offset in an open file.

Syntax

#include <sys/types.h>
#include <sys/errno.h>
int fp_lseek  (fp, offset, whence)
struct file *fp;
off_t offset;
int whence;
int fp_llseek  
(fp, offset, whence)
struct file *fp
offset_t offset;
int whence;

Parameters

fp Points to a file structure returned by the fp_open kernel service.
offset Specifies the number of bytes (positive or negative) to move the file pointer.
whence Indicates how to use the offset value:
SEEK_SET Sets file pointer equal to the number of bytes specified by the offset parameter.
SEEK_CUR Adds the number of bytes specified by the offset parameter to current file pointer.
SEEK_END Adds the number of bytes specified by the offset parameter to current end of file.

Description

The fp_lseek and fp_llseek kernel services are internal interfaces to the function provided by the lseek and llseek subroutines.

Execution Environment

The fp_lseek and fp_llseek kernel services can be called from the process environment only.

Return Values

0 Indicates a successful operation.
ERRNO Returns an error number from the /usr/include/sys/errno.h file on failure.

Implementation Specifics

The fp_lseek and fp_llseek kernel services are parts of Base Operating System (BOS) Runtime.

Related Information

The lseek, llseek subroutine.

Logical File System Kernel Services in AIX Version 4.3 Kernel Extensions and Device Support Programming Concepts.


[ Previous | Next | Contents | Home | Search ]