gpfs_ireadlink64() subroutine
Reads a symbolic link by inode number.
Library
GPFS Library (libgpfs.a for AIX®, libgpfs.so for Linux®)
Synopsis
#include <gpfs.h>
int gpfs_ireadlink64(gpfs_fssnap_handle_t *fssnapHandle,
gpfs_ino64_t ino,
char *buffer,
int bufferSize);
Description
The gpfs_ireadlink64() subroutine reads a symbolic link by inode number. Like gpfs_iopen64(), it uses the same fssnapHandle parameter that was used by the inode scan.
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
- fssnapHandle
- The file system snapshot handle.
- ino
- The inode number of the link file to read.
- buffer
- A pointer to buffer for the returned link data.
- bufferSize
- The size of the buffer.
Exit status
If the gpfs_ireadlink64() subroutine is successful, it returns the number of bytes read.
If the gpfs_ireadlink64() 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:
- EINVAL
- Missing or incorrect parameter.
- ENOENT
- No such file or directory.
- ENOMEM
- Unable to allocate memory for the request.
- ENOSYS
- The gpfs_ireadlink64() subroutine is not available.
- EPERM
- The caller does not have superuser privileges.
- ERANGE
- On AIX, the buffer is too small to return the symbolic link.
- ESTALE
- The cached file system information was not valid.
- GPFS_E_INVAL_FSSNAPHANDLE
- The file system snapshot handle is not valid.
Note: gpfs_ireadlink64() calls
the standard library subroutine readlink();
if this called subroutine returns an error, gpfs_ireadlink64() also
returns that error.
Location
/usr/lpp/mmfs/lib/libgpfs.a for AIX
/usr/lpp/mmfs/lib/libgpfs.so for Linux