gpfs_igetattrs() subroutine
Retrieves extended file attributes in opaque format.
Library
GPFS Library (libgpfs.a for AIX®, libgpfs.so for Linux®)
Synopsis
#include <gpfs.h>
int gpfs_igetattrs(gpfs_ifile_t *ifile,
void *buffer,
int bufferSize,
int *attrSize);
Description
The gpfs_igetattrs() subroutine retrieves all extended file attributes in opaque format. This subroutine is intended for use by a backup program to save all extended file attributes (ACLs, attributes, and so forth). If the file does not have any extended attributes, the subroutine sets attrSize to zero.
- This call does not return extended attributes used for the Data Storage Management (XDSM) API (also known as DMAPI).
- Compile any program that uses this subroutine with the -lgpfs flag
from the following library:
- libgpfs.a for AIX
- libgpfs.so for Linux
Parameters
- ifile
- Pointer to gpfs_ifile_t from gpfs_iopen().
- buffer
- Pointer to buffer for returned attributes.
- bufferSize
- Size of the buffer.
- attrSize
- Pointer to returned size of attributes.
Exit status
If the gpfs_igetattrs() subroutine is successful, it returns a value of 0.
If the gpfs_igetattrs() 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:
- ENOSPC
- The buffer is too small to return all attributes. Field attrSize will be set to the size necessary.
- ENOSYS
- The gpfs_igetattrs() subroutine is not available.
- EPERM
- The caller does not have superuser privileges.
- ESTALE
- Cached file system information was not valid.
- GPFS_E_INVAL_IFILE
- Incorrect ifile parameters.
Location
/usr/lpp/mmfs/lib/libgpfs.a for AIX
/usr/lpp/mmfs/lib/libgpfs.so for Linux