gpfs_lib_init() subroutine

Sets up a GPFS interface for additional calls.

Library

GPFS Library (libgpfs.a for AIX®, libgpfs.so for Linux®)

Synopsis

#include <gpfs.h>
int gpfs_lib_init(int flags);

Description

The gpfs_lib_init() subroutine, together with the gpfs_lib_term() subroutine, is intended for use by a program that makes repeated calls to a GPFS programming interface. This subroutine sets up the internal structure to speed up additional interface calls.
Note: Compile any program that uses this subroutine with the -lgpfs flag from the following library:
  • libgpfs.a for AIX
  • libgpfs.so for Linux

Parameters

flags
Reserved for future use. Must be zero.

Exit status

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

If the gpfs_lib_init() 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

Error codes include but are not limited to the following:

EINVAL
A nonzero value was passed as the flags parameter.
ENOSYS
The gpfs_lib_init() subroutine is not supported under the current file system format.

Examples

For an example using gpfs_lib_init(), see /usr/lpp/mmfs/samples/util/tsfindinode.c.

Location

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

/usr/lpp/mmfs/lib/libgpfs.so for Linux