#include <sys/param.h>
#include <sys/mount.h> int
getfh (const char *path fhandle_t *fhp); int
lgetfh (const char *path fhandle_t *fhp);
DESCRIPTION
The
getfh ();
system call
returns a file handle for the specified file or directory
in the file handle pointed to by
Fa fhp .
The
lgetfh ();
system call is like
getfh ();
except in the case where the named file is a symbolic link,
in which case
lgetfh ();
returns information about the link,
while
getfh ();
returns information about the file the link references.
These system calls are restricted to the superuser.
RETURN VALUES
Rv -std
ERRORS
The
getfh ();
and
lgetfgh ();
system calls
fail if one or more of the following are true:
Bq Er ENOTDIR
A component of the path prefix of
Fa path
is not a directory.
Bq Er ENAMETOOLONG
The length of a component of
Fa path
exceeds 255 characters,
or the length of
Fa path
exceeds 1023 characters.
Bq Er ENOENT
The file referred to by
Fa path
does not exist.
Bq Er EACCES
Search permission is denied for a component of the path prefix of
Fa path .
Bq Er ELOOP
Too many symbolic links were encountered in translating
Fa path .
Bq Er EFAULT
The
Fa fhp
argument
points to an invalid address.
Bq Er EIO
An
I/O
error occurred while reading from or writing to the file system.
HISTORY
The
getfh ();
system call first appeared in
BSD 4.4