getfh.2freebsd

Langue: en

Version: 265800 (debian - 07/07/09)

Section: 2 (Appels système)


BSD mandoc

NAME

getfh lgetfh - get file handle

LIBRARY

Lb libc

SYNOPSIS

In sys/param.h In sys/mount.h Ft int Fn getfh const char *path fhandle_t *fhp Ft int Fn lgetfh const char *path fhandle_t *fhp

DESCRIPTION

The Fn getfh system call returns a file handle for the specified file or directory in the file handle pointed to by Fa fhp . The Fn lgetfh system call is like Fn getfh except in the case where the named file is a symbolic link, in which case Fn lgetfh returns information about the link, while Fn getfh returns information about the file the link references. These system calls are restricted to the superuser.

RETURN VALUES

Rv -std

ERRORS

The Fn getfh and Fn 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 Fn getfh system call first appeared in BSD 4.4