new quota system
[unix-history] / usr / src / lib / libc / sys / getfh.2
CommitLineData
f124e718
KM
1.\" Copyright (c) 1989 The Regents of the University of California.
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms are permitted
5.\" provided that the above copyright notice and this paragraph are
6.\" duplicated in all such forms and that any documentation,
7.\" advertising materials, and other materials related to such
8.\" distribution and use acknowledge that the software was developed
9.\" by the University of California, Berkeley. The name of the
10.\" University may not be used to endorse or promote products derived
11.\" from this software without specific prior written permission.
12.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
13.\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
14.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
15.\"
16.\" @(#)getfh.2 6.1 (Berkeley) %G%
17.\"
18.TH GETFH 2 ""
19.UC 7
20.SH NAME
21getfh \- get file handle
22.SH SYNOPSIS
23.nf
24.ft B
25#include <sys/types.h>
26#include <sys/mount.h>
27.LP
28.ft B
29getfh(path, fhp)
30char *path;
31struct fhandle_t *fhp;
32.fi
33.ft R
34.SH DESCRIPTION
35.I Getfh
36returns a file handle for the specified file or directory
37in the file handle pointed to by
38.I fhp .
39This system call is restricted to the superuser.
40.SH RETURN VALUE
41Upon successful completion, a value of 0 is returned.
42Otherwise, \-1 is returned and the global variable
43.I errno
44is set to indicate the error.
45.SH ERRORS
46.I Getfh
47fails if one or more of the following are true:
48.TP 15
49ENOTDIR
50A component of the path prefix of
51.I path
52is not a directory.
53.TP 15
54EINVAL
55.I path
56contains a character with the high-order bit set.
57.TP 15
58ENAMETOOLONG
59The length of a component of
60.I path
61exceeds 255 characters,
62or the length of
63.I path
64exceeds 1023 characters.
65.TP 15
66ENOENT
67The file referred to by
68.I path
69does not exist.
70.TP 15
71EACCES
72Search permission is denied for a component of the path prefix of
73.IR path .
74.TP 15
75ELOOP
76Too many symbolic links were encountered in translating
77.IR path .
78.TP 15
79EFAULT
80.I Fhp
81points to an invalid address.
82.TP 15
83EIO
84An I/O error occurred while reading from or writing to the file system.