Commit | Line | Data |
---|---|---|
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 | |
21 | getfh \- 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 | |
29 | getfh(path, fhp) | |
30 | char *path; | |
31 | struct fhandle_t *fhp; | |
32 | .fi | |
33 | .ft R | |
34 | .SH DESCRIPTION | |
35 | .I Getfh | |
36 | returns a file handle for the specified file or directory | |
37 | in the file handle pointed to by | |
38 | .I fhp . | |
39 | This system call is restricted to the superuser. | |
40 | .SH RETURN VALUE | |
41 | Upon successful completion, a value of 0 is returned. | |
42 | Otherwise, \-1 is returned and the global variable | |
43 | .I errno | |
44 | is set to indicate the error. | |
45 | .SH ERRORS | |
46 | .I Getfh | |
47 | fails if one or more of the following are true: | |
48 | .TP 15 | |
49 | ENOTDIR | |
50 | A component of the path prefix of | |
51 | .I path | |
52 | is not a directory. | |
53 | .TP 15 | |
54 | EINVAL | |
55 | .I path | |
56 | contains a character with the high-order bit set. | |
57 | .TP 15 | |
58 | ENAMETOOLONG | |
59 | The length of a component of | |
60 | .I path | |
61 | exceeds 255 characters, | |
62 | or the length of | |
63 | .I path | |
64 | exceeds 1023 characters. | |
65 | .TP 15 | |
66 | ENOENT | |
67 | The file referred to by | |
68 | .I path | |
69 | does not exist. | |
70 | .TP 15 | |
71 | EACCES | |
72 | Search permission is denied for a component of the path prefix of | |
73 | .IR path . | |
74 | .TP 15 | |
75 | ELOOP | |
76 | Too many symbolic links were encountered in translating | |
77 | .IR path . | |
78 | .TP 15 | |
79 | EFAULT | |
80 | .I Fhp | |
81 | points to an invalid address. | |
82 | .TP 15 | |
83 | EIO | |
84 | An I/O error occurred while reading from or writing to the file system. |