29.01.2013 Views

GPFS: Administration and Programming Reference - IRA Home

GPFS: Administration and Programming Reference - IRA Home

GPFS: Administration and Programming Reference - IRA Home

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

gpfs_igetattrs() Subroutine<br />

Name<br />

gpfs_igetattrs() - Retrieve all extended file attributes in opaque format.<br />

Library<br />

<strong>GPFS</strong> Library (libgpfs.a for AIX, libgpfs.so for Linux)<br />

Synopsis<br />

#include <br />

int gpfs_igetattrs(gpfs_ifile_t *ifile,<br />

void *buffer,<br />

int bufferSize,<br />

int *attrSize);<br />

Description<br />

The gpfs_igetattrs() subroutine retrieves all extended file attributes in opaque format. This subroutine is<br />

intended for use by a backup program to save all extended file attributes (ACLs, DMAPI attributes, <strong>and</strong> so<br />

forth) in one invocation. If the file does not have any extended attributes, the subroutine sets attrSize to<br />

zero.<br />

Notes:<br />

1. Compile any program that uses this subroutine with the -lgpfs flag from the following library:<br />

v libgpfs.a for AIX<br />

v libgpfs.so for Linux<br />

Parameters<br />

ifile Pointer to gpfs_ifile_t from gpfs_iopen().<br />

buffer Pointer to buffer for returned attributes.<br />

bufferSize Size of the buffer.<br />

attrSize Pointer to returned size of attributes.<br />

Exit status<br />

If the gpfs_igetattrs() subroutine is successful, it returns a value of 0.<br />

If the gpfs_igetattrs() subroutine is unsuccessful, it returns a value of -1 <strong>and</strong> sets the global error variable<br />

errno to indicate the nature of the error.<br />

Exceptions<br />

None.<br />

Error status<br />

ENOSYS The gpfs_igetattrs() subroutine is not available.<br />

EPERM The caller does not have superuser privileges.<br />

ERANGE The buffer is too small to return all attributes. Field *attrSizeP will be set to the size<br />

necessary.<br />

ESTALE Cached file system information was not valid.<br />

Chapter 9. <strong>GPFS</strong> programming interfaces 311

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!