4.3BSD-Reno/src/lib/libc/sys/getfh.2

Compare this file to the similar file:
Show the results in this format:

.\" Copyright (c) 1989 The Regents of the University of California.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms are permitted provided
.\" that: (1) source distributions retain this entire copyright notice and
.\" comment, and (2) distributions including binaries display the following
.\" acknowledgement:  ``This product includes software developed by the
.\" University of California, Berkeley and its contributors'' in the
.\" documentation or other materials provided with the distribution and in
.\" all advertising materials mentioning features or use of this software.
.\" Neither the name of the University nor the names of its contributors may
.\" be used to endorse or promote products derived from this software without
.\" specific prior written permission.
.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
.\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
.\"
.\"	@(#)getfh.2	6.2 (Berkeley) 6/23/90
.\"
.TH GETFH 2 "June 23, 1990"
.UC 7
.SH NAME
getfh \- get file handle
.SH SYNOPSIS
.nf
.ft B
#include <sys/types.h>
#include <sys/mount.h>
.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.