getfh(2)
NAME
getfh − return file handle for file on remote node
SYNOPSIS
#include <time.h>
#include <rpc/rpc.h>
#include <errno.h>
#include <nfs/nfs.h>
int getfh(char *path, fhandle_t *fhp);
DESCRIPTION
getfh() returns a file handle in the struct pointed to by fhp for the file pointed to by path. This information is used to perform an NFS mount for a remote node. getfh() is executed on the remote node; results are passed back to the program doing the NFS mount. The caller should never examine the file handle contents. The file handle only identifies a file to the node that produced the file handle. (The term "file handle" refers to an NFS concept.)
Only the super-user can invoke getfh().
RETURN VALUE
Upon successful completion, getfh() returns 0; otherwise it returns −1 and sets errno to indicate the error.
ERRORS
getfh() fails if any of the following conditions are encountered:
[EPERM] The effective user ID is not super-user.
[ENOENT] File or directory specified by path does not exist.
[EINVAL] Invalid argument, or the file or directory has not been exported by exportfs (see exportfs(1M)).
[EREMOTE] The file or directory specified by path is a remote file or directory.
WARNINGS
This call should be used only by HP-supplied commands and is not recommended for use by non-HP-supplied programs.
AUTHOR
Sun Microsystems, Inc.
SEE ALSO
exportfs(1M), mount(1M), vfsmount(2).
Hewlett-Packard Company — HP-UX Release 9.03: April 1994