xref: /freebsd/lib/libc/gen/getvfsbyname.3 (revision dc36d6f9bb1753f3808552f3afd30eda9a7b206a)
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.
12fbbd9655SWarner 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.\"
28*284001a2SJamie Gritton.Dd August 16, 2018
29662909a7SPeter Wemm.Dt GETVFSBYNAME 3
30662909a7SPeter Wemm.Os
31662909a7SPeter Wemm.Sh NAME
32662909a7SPeter Wemm.Nm getvfsbyname
33662909a7SPeter Wemm.Nd get information about a file system
3425bb73e0SAlexey Zelkin.Sh LIBRARY
3525bb73e0SAlexey Zelkin.Lb libc
36662909a7SPeter Wemm.Sh SYNOPSIS
3732eef9aeSRuslan Ermilov.In sys/param.h
3832eef9aeSRuslan Ermilov.In sys/mount.h
39662909a7SPeter Wemm.Ft int
405965373eSMaxime Henrion.Fn getvfsbyname "const char *name" "struct xvfsconf *vfc"
41662909a7SPeter Wemm.Sh DESCRIPTION
42662909a7SPeter WemmThe
43662909a7SPeter Wemm.Fn getvfsbyname
44662909a7SPeter Wemmfunction provides access to information about a
45662909a7SPeter Wemmfile system module that is configured in the kernel.
46662909a7SPeter WemmIf successful,
47662909a7SPeter Wemmthe requested file system
485965373eSMaxime Henrion.Fa xvfsconf
49662909a7SPeter Wemmis returned in the location pointed to by
501d104f9fSMike Pritchard.Fa vfc .
51662909a7SPeter WemmThe fields in a
525965373eSMaxime Henrion.Dq Li struct xvfsconf
53662909a7SPeter Wemmare defined as follows:
54662909a7SPeter Wemm.Pp
55662909a7SPeter Wemm.Bl -tag -compact -width vfc_refcount
56662909a7SPeter Wemm.It vfc_name
57662909a7SPeter Wemmthe name of the file system
58662909a7SPeter Wemm.It vfc_typenum
59662909a7SPeter Wemmthe file system type number assigned by the kernel
60662909a7SPeter Wemm.It vfc_refcount
61662909a7SPeter Wemmthe number of active mount points using the file system
62662909a7SPeter Wemm.It vfc_flags
635965373eSMaxime Henrionflag bits, as described below
645965373eSMaxime Henrion.El
655965373eSMaxime Henrion.Pp
665965373eSMaxime HenrionThe flags are defined as follows:
675965373eSMaxime Henrion.Pp
681ba4a712SPawel Jakub Dawidek.Bl -tag -width VFCF_DELEGADMIN -compact
695965373eSMaxime Henrion.It Dv VFCF_STATIC
705965373eSMaxime Henrionstatically compiled into kernel
715965373eSMaxime Henrion.It Dv VFCF_NETWORK
725965373eSMaxime Henrionmay get data over the network
735965373eSMaxime Henrion.It Dv VFCF_READONLY
745965373eSMaxime Henrionwrites are not implemented
755965373eSMaxime Henrion.It Dv VFCF_SYNTHETIC
765965373eSMaxime Henriondata does not represent real files
775965373eSMaxime Henrion.It Dv VFCF_LOOPBACK
785965373eSMaxime Henrionaliases some other mounted FS
795965373eSMaxime Henrion.It Dv VFCF_UNICODE
805965373eSMaxime Henrionstores file names as Unicode
81f3a8d2f9SPawel Jakub Dawidek.It Dv VFCF_JAIL
82f3a8d2f9SPawel Jakub Dawidekcan be mounted from within a jail if
83*284001a2SJamie Gritton.Va allow.mount
84*284001a2SJamie Grittonand
85*284001a2SJamie Gritton.Va allow.mount.<vfc_name>
86*284001a2SJamie Grittonjail parameters are set
871ba4a712SPawel Jakub Dawidek.It Dv VFCF_DELEGADMIN
881ba4a712SPawel Jakub Dawideksupports delegated administration if
891ba4a712SPawel Jakub Dawidek.Va vfs.usermount
901ba4a712SPawel Jakub Dawideksysctl is set to
911ba4a712SPawel Jakub Dawidek.Dv 1
92662909a7SPeter Wemm.El
93662909a7SPeter Wemm.Sh RETURN VALUES
94563f6bdeSRuslan Ermilov.Rv -std getvfsbyname
95662909a7SPeter Wemm.Sh ERRORS
96662909a7SPeter WemmThe following errors may be reported:
97662909a7SPeter Wemm.Bl -tag -width Er
98662909a7SPeter Wemm.It Bq Er ENOENT
99662909a7SPeter WemmThe
100662909a7SPeter Wemm.Fa name
1012efeeba5SRuslan Ermilovargument
102662909a7SPeter Wemmspecifies a file system that is unknown or not configured in the kernel.
10342635956SRuslan Ermilov.El
104662909a7SPeter Wemm.Sh SEE ALSO
105f3a8d2f9SPawel Jakub Dawidek.Xr jail 2 ,
106662909a7SPeter Wemm.Xr mount 2 ,
107662909a7SPeter Wemm.Xr sysctl 3 ,
108f3a8d2f9SPawel Jakub Dawidek.Xr jail 8 ,
109b21e4aedSChris Costello.Xr mount 8 ,
110b21e4aedSChris Costello.Xr sysctl 8
111662909a7SPeter Wemm.Sh HISTORY
112662909a7SPeter WemmA variant of the
113662909a7SPeter Wemm.Fn getvfsbyname
1141d104f9fSMike Pritchardfunction first appeared in
1151d104f9fSMike Pritchard.Fx 2.0 .
116