IBM Books

IBM General Parallel File System for AIX: Administration and Programming Reference

gpfs_fstat( ) Subroutine

Name

gpfs_fstat - Returns exact file status for a GPFS file.

Library

GPFS Library (libgpfs.a)

Synopsis

#include <gpfs.h>
int gpfs_fstat(int fileDesc, struct stat64 *Buffer)   

Description

The gpfs_fstat( ) function is used to obtain exact information about the file associated with the FileDesc parameter. This call is provided as an alternative to the stat( ) call which may not provide exact mtime and atime values (see Exceptions to Open Group technical standards).

read, write, or execute permission for the named file is not required, but all directories listed in the path leading to the file must be searchable. The file information is written to the area specified by the Buffer parameter.

Notes:

  1. Compile any program that uses this function from the libgpfs.a library with the -lgpfs flag.

  2. In order to use the 64-bit version of this function, compile it with the appropriate compiler options for 64-bit mode.

Parameters

fileDesc
The file descriptor identifying the file for which exact status information is requested.

Buffer
A pointer to the stat64 structure in which the information is returned. The stat64 structure is described in the sys/stat.h file.

Exit status

If the gpfs_fstat( ) subroutine is successful, it returns a value of 0.

If the gpfs_fstat( ) subroutine is unsuccessful, it returns a value of -1 and sets the global error variable errno to indicate the nature of the error.

Exceptions

NONE

Error status

ENOSYS
The gpfs_fstat( ) function is not supported under the current file system format.

EBADF
The file descriptor is invalid.

EINVAL
The file descriptor does not refer to a GPFS file or a regular file.

Location

/usr/lpp/mmfs/lib/libgpfs.a


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]