getfh(2)
Requires Optional NFS Services Software
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(int fildes, fhandle_t *fhp);
DESCRIPTION
getfh returns a file handle in the struct pointed to by fhp for an open file referenced by the file descriptor fildes. This information is used to perform an NFS mount for a remote node. The 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
getfh returns 0 if it succeeds and −1 if an error occurs. errno contains the appropiate value if getfh returns with −1.
ERRORS
getfh fails if one of the following conditions is true and sets errno accordingly:
[EPERM] The effective user ID is not super-user.
[EBADF] fildes is not a valid file descriptor.
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
Hewlett-Packard Company — HP-UX Release 8.05: June 1991