xref: /freebsd/lib/libc/gen/getvfsbyname.3 (revision 5965373e69ca208cedd8ede9716ef0d58e6c3434)
1662909a7SPeter Wemm.\" Copyright (c) 1995
2662909a7SPeter Wemm.\"	The Regents of the University of California.  All rights reserved.
3662909a7SPeter Wemm.\"
4662909a7SPeter Wemm.\" Redistribution and use in source and binary forms, with or without
5662909a7SPeter Wemm.\" modification, are permitted provided that the following conditions
6662909a7SPeter Wemm.\" are met:
7662909a7SPeter Wemm.\" 1. Redistributions of source code must retain the above copyright
8662909a7SPeter Wemm.\"    notice, this list of conditions and the following disclaimer.
9662909a7SPeter Wemm.\" 2. Redistributions in binary form must reproduce the above copyright
10662909a7SPeter Wemm.\"    notice, this list of conditions and the following disclaimer in the
11662909a7SPeter Wemm.\"    documentation and/or other materials provided with the distribution.
12662909a7SPeter Wemm.\" 3. All advertising materials mentioning features or use of this software
13662909a7SPeter Wemm.\"    must display the following acknowledgement:
14662909a7SPeter Wemm.\"	This product includes software developed by the University of
15662909a7SPeter Wemm.\"	California, Berkeley and its contributors.
16662909a7SPeter Wemm.\" 4. Neither the name of the University nor the names of its contributors
17662909a7SPeter Wemm.\"    may be used to endorse or promote products derived from this software
18662909a7SPeter Wemm.\"    without specific prior written permission.
19662909a7SPeter Wemm.\"
20662909a7SPeter Wemm.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21662909a7SPeter Wemm.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22662909a7SPeter Wemm.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23662909a7SPeter Wemm.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24662909a7SPeter Wemm.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25662909a7SPeter Wemm.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26662909a7SPeter Wemm.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27662909a7SPeter Wemm.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28662909a7SPeter Wemm.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29662909a7SPeter Wemm.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30662909a7SPeter Wemm.\" SUCH DAMAGE.
31662909a7SPeter Wemm.\"
32662909a7SPeter Wemm.\"     @(#)kvm_getvfsbyname.3	8.3 (Berkeley) 5/4/95
337f3dea24SPeter Wemm.\" $FreeBSD$
34662909a7SPeter Wemm.\"
35662909a7SPeter Wemm.Dd May 4, 1995
36662909a7SPeter Wemm.Dt GETVFSBYNAME 3
37662909a7SPeter Wemm.Os
38662909a7SPeter Wemm.Sh NAME
39662909a7SPeter Wemm.Nm getvfsbyname
40662909a7SPeter Wemm.Nd get information about a filesystem
4125bb73e0SAlexey Zelkin.Sh LIBRARY
4225bb73e0SAlexey Zelkin.Lb libc
43662909a7SPeter Wemm.Sh SYNOPSIS
4432eef9aeSRuslan Ermilov.In sys/param.h
4532eef9aeSRuslan Ermilov.In sys/mount.h
46662909a7SPeter Wemm.Ft int
475965373eSMaxime Henrion.Fn getvfsbyname "const char *name" "struct xvfsconf *vfc"
48662909a7SPeter Wemm.Sh DESCRIPTION
49662909a7SPeter WemmThe
50662909a7SPeter Wemm.Fn getvfsbyname
51662909a7SPeter Wemmfunction provides access to information about a
52662909a7SPeter Wemmfilesystem module that is configured in the kernel.
53662909a7SPeter WemmIf successful,
54662909a7SPeter Wemmthe requested filesystem
555965373eSMaxime Henrion.Fa xvfsconf
56662909a7SPeter Wemmis returned in the location pointed to by
571d104f9fSMike Pritchard.Fa vfc .
58662909a7SPeter WemmThe fields in a
595965373eSMaxime Henrion.Dq Li struct xvfsconf
60662909a7SPeter Wemmare defined as follows:
61662909a7SPeter Wemm.Pp
62662909a7SPeter Wemm.Bl -tag -compact -width vfc_refcount
63662909a7SPeter Wemm.It vfc_name
64662909a7SPeter Wemmthe name of the filesystem
65662909a7SPeter Wemm.It vfc_typenum
66662909a7SPeter Wemmthe filesystem type number assigned by the kernel
67662909a7SPeter Wemm.It vfc_refcount
68662909a7SPeter Wemmthe number of active mount points using the filesystem
69662909a7SPeter Wemm.It vfc_flags
705965373eSMaxime Henrionflag bits, as described below
715965373eSMaxime Henrion.El
725965373eSMaxime Henrion.Pp
735965373eSMaxime HenrionThe flags are defined as follows:
745965373eSMaxime Henrion.Pp
755965373eSMaxime Henrion.Bl -tag -width VFCF_SYNTHETIC -compact
765965373eSMaxime Henrion.It Dv VFCF_STATIC
775965373eSMaxime Henrionstatically compiled into kernel
785965373eSMaxime Henrion.It Dv VFCF_NETWORK
795965373eSMaxime Henrionmay get data over the network
805965373eSMaxime Henrion.It Dv VFCF_READONLY
815965373eSMaxime Henrionwrites are not implemented
825965373eSMaxime Henrion.It Dv VFCF_SYNTHETIC
835965373eSMaxime Henriondata does not represent real files
845965373eSMaxime Henrion.It Dv VFCF_LOOPBACK
855965373eSMaxime Henrionaliases some other mounted FS
865965373eSMaxime Henrion.It Dv VFCF_UNICODE
875965373eSMaxime Henrionstores file names as Unicode
88662909a7SPeter Wemm.El
89662909a7SPeter Wemm.Sh RETURN VALUES
90563f6bdeSRuslan Ermilov.Rv -std getvfsbyname
91662909a7SPeter Wemm.Sh ERRORS
92662909a7SPeter WemmThe following errors may be reported:
93662909a7SPeter Wemm.Bl -tag -width Er
94662909a7SPeter Wemm.It Bq Er EFAULT
95662909a7SPeter WemmThe
96662909a7SPeter Wemm.Fa vfc
97662909a7SPeter Wemmpointer contains an invalid address.
98662909a7SPeter Wemm.It Bq Er ENOENT
99662909a7SPeter WemmThe
100662909a7SPeter Wemm.Fa name
101662909a7SPeter Wemmspecifies a filesystem that is unknown or not configured in the kernel.
10242635956SRuslan Ermilov.El
103662909a7SPeter Wemm.Sh SEE ALSO
104662909a7SPeter Wemm.Xr mount 2 ,
105662909a7SPeter Wemm.Xr sysctl 3 ,
106b21e4aedSChris Costello.Xr mount 8 ,
107b21e4aedSChris Costello.Xr sysctl 8
108662909a7SPeter Wemm.Sh HISTORY
109662909a7SPeter WemmA variant of the
110662909a7SPeter Wemm.Fn getvfsbyname
1111d104f9fSMike Pritchardfunction first appeared in
1121d104f9fSMike Pritchard.Fx 2.0 .
113