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

Name<br />

gpfs_ireadlink() - Reads a symbolic link by inode number.<br />

Library<br />

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

Synopsis<br />

#include <br />

int gpfs_ireadlink(gpfs_fssnap_h<strong>and</strong>le_t *fssnapH<strong>and</strong>le,<br />

gpfs_ino_t ino,<br />

char *buffer,<br />

int bufferSize);<br />

Description<br />

The gpfs_ireadlink() subroutine reads a symbolic link by inode number. Like gpfs_iopen(), use the same<br />

fssnapH<strong>and</strong>le parameter that was used by the inode scan.<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 />

fssnapH<strong>and</strong>le File system snapshot h<strong>and</strong>le.<br />

ino inode number of the link file to read.<br />

buffer Pointer to buffer for the returned link data.<br />

bufferSize Size of the buffer.<br />

Exit status<br />

If the gpfs_ireadlink() subroutine is successful, it returns the number of bytes read.<br />

If the gpfs_ireadlink() 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_ireadlink() subroutine is not available.<br />

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

ERANGE The buffer is too small to return the symbolic link.<br />

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

<strong>GPFS</strong>_E_INVAL_FSSNAPHANDLE<br />

The file system snapshot h<strong>and</strong>le is not valid.<br />

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

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

Saved successfully!

Ooh no, something went wrong!