gpfs_lib_term() subroutine
Cleans up after GPFS interface calls have been completed.
Library
GPFS Library (libgpfs.a for AIX®, libgpfs.so for Linux®)
Synopsis
#include <gpfs.h>
int gpfs_lib_term(int flags);
Description
The gpfs_lib_term() subroutine,
together with the gpfs_lib_init() subroutine,
is intended for use by a program that makes repeated calls to a GPFS programming interface. This
subroutine cleans up the internal structure previously set up by gpfs_lib_init().
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_term() subroutine is successful, it returns a value of 0.
If the gpfs_lib_term() 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:
- EINTR
- The gpfs_lib_term() subroutine was interrupted by a signal that was caught. Cleanup was done.
- EINVAL
- A nonzero value was passed as the flags parameter.
Examples
For an example using gpfs_lib_term(), 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