xref: /freebsd/lib/libc/gen/getvfsbyname.3 (revision fbbd9655e5107c68e4e0146ff22b73d7350475bc)
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.
12*fbbd9655SWarner Losh.\" 3. Neither the name of the University nor the names of its contributors
13662909a7SPeter Wemm.\"    may be used to endorse or promote products derived from this software
14662909a7SPeter Wemm.\"    without specific prior written permission.
15662909a7SPeter Wemm.\"
16662909a7SPeter Wemm.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
17662909a7SPeter Wemm.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18662909a7SPeter Wemm.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19662909a7SPeter Wemm.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
20662909a7SPeter Wemm.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21662909a7SPeter Wemm.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22662909a7SPeter Wemm.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23662909a7SPeter Wemm.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24662909a7SPeter Wemm.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25662909a7SPeter Wemm.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26662909a7SPeter Wemm.\" SUCH DAMAGE.
27662909a7SPeter Wemm.\"
28662909a7SPeter Wemm.\"     @(#)kvm_getvfsbyname.3	8.3 (Berkeley) 5/4/95
297f3dea24SPeter Wemm.\" $FreeBSD$
30662909a7SPeter Wemm.\"
311221d429SJilles Tjoelker.Dd August 30, 2016
32662909a7SPeter Wemm.Dt GETVFSBYNAME 3
33662909a7SPeter Wemm.Os
34662909a7SPeter Wemm.Sh NAME
35662909a7SPeter Wemm.Nm getvfsbyname
36662909a7SPeter Wemm.Nd get information about a file system
3725bb73e0SAlexey Zelkin.Sh LIBRARY
3825bb73e0SAlexey Zelkin.Lb libc
39662909a7SPeter Wemm.Sh SYNOPSIS
4032eef9aeSRuslan Ermilov.In sys/param.h
4132eef9aeSRuslan Ermilov.In sys/mount.h
42662909a7SPeter Wemm.Ft int
435965373eSMaxime Henrion.Fn getvfsbyname "const char *name" "struct xvfsconf *vfc"
44662909a7SPeter Wemm.Sh DESCRIPTION
45662909a7SPeter WemmThe
46662909a7SPeter Wemm.Fn getvfsbyname
47662909a7SPeter Wemmfunction provides access to information about a
48662909a7SPeter Wemmfile system module that is configured in the kernel.
49662909a7SPeter WemmIf successful,
50662909a7SPeter Wemmthe requested file system
515965373eSMaxime Henrion.Fa xvfsconf
52662909a7SPeter Wemmis returned in the location pointed to by
531d104f9fSMike Pritchard.Fa vfc .
54662909a7SPeter WemmThe fields in a
555965373eSMaxime Henrion.Dq Li struct xvfsconf
56662909a7SPeter Wemmare defined as follows:
57662909a7SPeter Wemm.Pp
58662909a7SPeter Wemm.Bl -tag -compact -width vfc_refcount
59662909a7SPeter Wemm.It vfc_name
60662909a7SPeter Wemmthe name of the file system
61662909a7SPeter Wemm.It vfc_typenum
62662909a7SPeter Wemmthe file system type number assigned by the kernel
63662909a7SPeter Wemm.It vfc_refcount
64662909a7SPeter Wemmthe number of active mount points using the file system
65662909a7SPeter Wemm.It vfc_flags
665965373eSMaxime Henrionflag bits, as described below
675965373eSMaxime Henrion.El
685965373eSMaxime Henrion.Pp
695965373eSMaxime HenrionThe flags are defined as follows:
705965373eSMaxime Henrion.Pp
711ba4a712SPawel Jakub Dawidek.Bl -tag -width VFCF_DELEGADMIN -compact
725965373eSMaxime Henrion.It Dv VFCF_STATIC
735965373eSMaxime Henrionstatically compiled into kernel
745965373eSMaxime Henrion.It Dv VFCF_NETWORK
755965373eSMaxime Henrionmay get data over the network
765965373eSMaxime Henrion.It Dv VFCF_READONLY
775965373eSMaxime Henrionwrites are not implemented
785965373eSMaxime Henrion.It Dv VFCF_SYNTHETIC
795965373eSMaxime Henriondata does not represent real files
805965373eSMaxime Henrion.It Dv VFCF_LOOPBACK
815965373eSMaxime Henrionaliases some other mounted FS
825965373eSMaxime Henrion.It Dv VFCF_UNICODE
835965373eSMaxime Henrionstores file names as Unicode
84f3a8d2f9SPawel Jakub Dawidek.It Dv VFCF_JAIL
85f3a8d2f9SPawel Jakub Dawidekcan be mounted from within a jail if
86f3a8d2f9SPawel Jakub Dawidek.Va security.jail.mount_allowed
87f3a8d2f9SPawel Jakub Dawideksysctl is set to
881ba4a712SPawel Jakub Dawidek.Dv 1
891ba4a712SPawel Jakub Dawidek.It Dv VFCF_DELEGADMIN
901ba4a712SPawel Jakub Dawideksupports delegated administration if
911ba4a712SPawel Jakub Dawidek.Va vfs.usermount
921ba4a712SPawel Jakub Dawideksysctl is set to
931ba4a712SPawel Jakub Dawidek.Dv 1
94662909a7SPeter Wemm.El
95662909a7SPeter Wemm.Sh RETURN VALUES
96563f6bdeSRuslan Ermilov.Rv -std getvfsbyname
97662909a7SPeter Wemm.Sh ERRORS
98662909a7SPeter WemmThe following errors may be reported:
99662909a7SPeter Wemm.Bl -tag -width Er
100662909a7SPeter Wemm.It Bq Er ENOENT
101662909a7SPeter WemmThe
102662909a7SPeter Wemm.Fa name
1032efeeba5SRuslan Ermilovargument
104662909a7SPeter Wemmspecifies a file system that is unknown or not configured in the kernel.
10542635956SRuslan Ermilov.El
106662909a7SPeter Wemm.Sh SEE ALSO
107f3a8d2f9SPawel Jakub Dawidek.Xr jail 2 ,
108662909a7SPeter Wemm.Xr mount 2 ,
109662909a7SPeter Wemm.Xr sysctl 3 ,
110f3a8d2f9SPawel Jakub Dawidek.Xr jail 8 ,
111b21e4aedSChris Costello.Xr mount 8 ,
112b21e4aedSChris Costello.Xr sysctl 8
113662909a7SPeter Wemm.Sh HISTORY
114662909a7SPeter WemmA variant of the
115662909a7SPeter Wemm.Fn getvfsbyname
1161d104f9fSMike Pritchardfunction first appeared in
1171d104f9fSMike Pritchard.Fx 2.0 .
118