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_fgetattrs() Subroutine<br />

Name<br />

gpfs_fgetattrs() – Retrieves 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_fgetattrs(int fileDesc, int flags, void *bufferP,<br />

int bufferSize, int *attrSizeP)<br />

Description<br />

The gpfs_fgetattrs() subroutine, together with gpfs_fputattrs() is intended for use by a backup program<br />

to save (gpfs_fgetattrs()) <strong>and</strong> restore (gpfs_fputattrs()) extended ACLs defined for the file. If the file has<br />

no extended ACLs, the gpfs_fgetattrs() subroutine returns a value of 0, but sets attrSizeP to zero <strong>and</strong><br />

leaves the content of the buffer unchanged.<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 />

fileDesc The file descriptor identifying the file whose extended attributes are being retrieved.<br />

flags RESERVED. This value must be set to 0.<br />

bufferP Pointer to a buffer to store the extended attribute information.<br />

bufferSize The size of the buffer that was passed in.<br />

attrSizeP If successful, returns the actual size of the attribute information that was stored in the<br />

buffer. If the bufferSize was too small, returns the minimum buffer size.<br />

Exit status<br />

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

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

ENOSPC bufferSize is too small to return all of the attributes. On return, *attrSizeP is set to the<br />

required size.<br />

ENOSYS The gpfs_fgetattrs() subroutine is not supported under the current file system format.<br />

Location<br />

/usr/lpp/mmfs/lib/libgpfs.a for AIX, /usr/lpp/mmfs/lib/libgpfs.so for Linux<br />

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

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

Saved successfully!

Ooh no, something went wrong!