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

fp_fstat Kernel Service


Gets the attributes of an open file.


#include <sys/types.h>
#include <sys/errno.h>

int fp_fstat (fp, statbuf, statsz, segflag)
struct file *fp;
caddr_t statbuf;
unsigned int statsz;
unsigned int segflag;


fp Points to a file structure returned by the fp_open kernel service.
statbuf Points to a buffer defined to be of stat or fullstat type structure. The statsz parameter indicates the buffer type.
statsz Indicates the size of the stat or fullstat structure to be returned. The /usr/include/sys/stat.h file contains information about the stat structure.
segflag Specifies the flag indicating where the information represented by the statbuf parameter is located:
SYS_ADSPACE Buffer is in kernel memory.
USER_ADSPACE Buffer is in user memory.


The fp_fstat kernel service is an internal interface to the function provided by the fstatx subroutine.

Execution Environment

The fp_fstat kernel service can be called from the process environment only.

Return Values

0 Indicates a successful operation.

If an error occurs, one of the values from the /usr/include/sys/errno.h file is returned.

Implementation Specifics

The fp_fstat kernel service is part of Base Operating System (BOS) Runtime.

Related Information

The fstatx subroutine.

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

[ Previous | Next | Contents | Home | Search ]