fgetstat_with_namespace

Obtains selected information about an open file, in the requested name space.

Library:LibC
Classification:Novell
Service:File and Directory I/O

Syntax

  #include <fsio.h> 
   
  int fgetstat_with_namespace (
     int             fildes,
     struct stat    *buf,
     unsigned long   requestmap,
     int            _namespace );
  

Parameters

fildes

(IN) Specifies a file handle.

buf

(OUT) Points to the address of a stat structure.

requestmap

(IN) Specifies a bit mask of the information to return. See Request Flags for Entry Status.

_namespace

(IN) Specifies the name space for the returned information. For a list of possible values, see Section 20.2.7, Name Space Flags.

Return Values

If successful, returns 0. Otherwise, returns one of the following errors. Unlike fstat, errno is not set.

Decimal

Constant

Description

4

EBADF

The fides parameter does not specify an open file.

28

EIO

An I/O error occurred while reading from the file system.

81

EOVERFLOW

Either one of the values is too large to store into the structure pointed to by the buf argument, or the file's size, its number of blocks, or its serial number cannot be stored correctly in the structure.

Remarks

The fgetstat_with_namespace function obtains information about an open file whose file descriptor is the fildes parameter. This information is placed in the structure located at the address indicated by the buf parameter.The requestmap parameter determines which fields in the stat structure return with information. The _namespace parameter determines the format of the name in the st_name field if the ST_NS_BIT is set in the requestmap parameter. The fields not requested have undefined values.

The sys/stat.h header file contains definitions for the stat structure and describes the contents of the fields within that structure.

See Also