IBM Books

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

gpfs_stat( ) Subroutine

Name

gpfs_stat - Returns exact file status for a GPFS file.

Library

GPFS Library (libgpfs.a)

Synopsis

#include <gpfs.h>
int gpfs_stat(char *pathName, struct stat64 *Buffer)   

Description

The gpfs_stat( ) function is used to obtain exact information about the file named by the Pathname 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

pathName
The path 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_stat( ) subroutine is successful, it returns a value of 0.

If the gpfs_stat( ) 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_stat( ) function is not supported under the current file system format.

EBADF
The path name is invalid.

EINVAL
The path name 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 ]