.\" Copyright (c) 1989 The Regents of the University of California. .\" All rights reserved. .\" .\" %sccs.include.redist.man% .\" .\" @(#)getfh.2 6.2 (Berkeley) 06/23/90 .\" .TH GETFH 2 "" .UC 7 .SH NAME getfh \- get file handle .SH SYNOPSIS .nf .ft B #include #include .LP .ft B getfh(path, fhp) char *path; struct fhandle_t *fhp; .fi .ft R .SH DESCRIPTION .I Getfh returns a file handle for the specified file or directory in the file handle pointed to by .I fhp . This system call is restricted to the superuser. .SH RETURN VALUE Upon successful completion, a value of 0 is returned. Otherwise, \-1 is returned and the global variable .I errno is set to indicate the error. .SH ERRORS .I Getfh fails if one or more of the following are true: .TP 15 ENOTDIR A component of the path prefix of .I path is not a directory. .TP 15 EINVAL .I path contains a character with the high-order bit set. .TP 15 ENAMETOOLONG The length of a component of .I path exceeds 255 characters, or the length of .I path exceeds 1023 characters. .TP 15 ENOENT The file referred to by .I path does not exist. .TP 15 EACCES Search permission is denied for a component of the path prefix of .IR path . .TP 15 ELOOP Too many symbolic links were encountered in translating .IR path . .TP 15 EFAULT .I Fhp points to an invalid address. .TP 15 EIO An I/O error occurred while reading from or writing to the file system.