getfh(2) — System Calls
OSF
NAME
getfh − Gets a file handle
SYNOPSIS
#include <sys/types.h>
#include <sys/mount.h> getfh(
char ∗path,
struct fhandle_t ∗fhp );
PARAMETERS
pathPoints to the file.
fhpPoints to a fhandle_t structure.
DESCRIPTION
The getfh() function returns a file handle for the specified file or directory in the file handle pointed to by the fhp parameter. This function is restricted to the superuser.
RETURN VALUES
Upon successful completion, a value of 0 (zero) is returned. Otherwise, −1 is returned and errno is set to indicate the error.
ERRORS
If the getfh() function fails, errno may be set to one of the following values:
[ENOTDIR]A component of the path prefix of the path parameter is not a directory.
[EINVAL]The path parameter contains a character with the high-order bit set.
[ENAMETOOLONG]
The length of a component of the pathname parameter exceeds NAME_MAX characters, or the length of the path parameter exceeds PATH_MAX characters.
[ENOENT]The file referred to by the path parameter does not exist.
[EACCES]Search permission is denied for a component of the path prefix of the path parameter.
[ELOOP]Too many symbolic links were encountered in translating the path parameter.
[EFAULT]The fhp parameter points to an invalid address.
[EIO]An I/O error occurred while reading from or writing to the file system.
[EPERM]The calling process does not have appropriate privilege.