1 .\" $NetBSD: fhopen.2,v 1.1 1999/06/30 01:32:15 wrstuden Exp $
2 .\" $FreeBSD: src/lib/libc/sys/fhopen.2,v 1.4.2.7 2002/12/29 16:35:34 schweikh Exp $
3 .\" $DragonFly: src/lib/libcr/sys/Attic/fhopen.2,v 1.2 2003/06/17 04:26:47 dillon Exp $
5 .\" Copyright (c) 1999 National Aeronautics & Space Administration
6 .\" All rights reserved.
8 .\" This software was written by William Studenmund of the
9 .\" Numerical Aerospace Simulation Facility, NASA Ames Research Center.
11 .\" Redistribution and use in source and binary forms, with or without
12 .\" modification, are permitted provided that the following conditions
14 .\" 1. Redistributions of source code must retain the above copyright
15 .\" notice, this list of conditions and the following disclaimer.
16 .\" 2. Redistributions in binary form must reproduce the above copyright
17 .\" notice, this list of conditions and the following disclaimer in the
18 .\" documentation and/or other materials provided with the distribution.
19 .\" 3. Neither the name of the National Aeronautics & Space Administration
20 .\" nor the names of its contributors may be used to endorse or promote
21 .\" products derived from this software without specific prior written
24 .\" THIS SOFTWARE IS PROVIDED BY THE NATIONAL AERONAUTICS & SPACE ADMINISTRATION
25 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
26 .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
27 .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ADMINISTRATION OR CONTRIB-
28 .\" UTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
29 .\" OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
30 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
32 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34 .\" POSSIBILITY OF SUCH DAMAGE.
43 .Nd access file via file handle
51 .Fn fhopen "const fhandle_t *fhp" "int flags"
53 .Fn fhstat "const fhandle_t *fhp" "struct stat *sb"
55 .Fn fhstatfs "const fhandle_t *fhp" "struct statfs *buf"
57 These functions provide a means to access a file given the file handle
59 As this method bypasses directory access restrictions, these calls are
60 restricted to the superuser.
63 opens the file referenced by
65 for reading and/or writing as specified by the argument
67 and returns the file descriptor to the calling process.
72 together the flags used for the
75 All said flags are valid except for
81 provide the functionality of the
85 calls except that they return information for the file referred to by
87 rather than an open file.
89 Upon successful completion,
91 returns the file descriptor for the opened file;
92 otherwise the value \-1 is returned and the global variable
94 is set to indicate the error.
96 .Rv -std fhstat fhstatfs
98 In addition to the errors returned by
132 functions first appeared in
138 This man page was written by
139 .An William Studenmund