fp_fstat Kernel Service

Purpose

Gets the attributes of an open file.

Syntax

#include <sys/types.h> #include <sys/errno.h> int fp_fstat (fp, statp, len, seg) struct file* fp; struct stat *statp; int len; int seg;

Parameters

Item Description
fp Points to a file structure returned by the fp_open kernel service.
statp Points to a buffer defined to be of stat or fullstat type structure. The statsz parameter indicates the buffer type.
len 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.
seg 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.

Description

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

Item Description
0 Indicates a successful operation.

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