168720Smckusick.\" Copyright (c) 1995 268720Smckusick.\" The Regents of the University of California. All rights reserved. 368720Smckusick.\" 468720Smckusick.\" %sccs.include.redist.man% 568720Smckusick.\" 6*69267Smckusick.\" @(#)getvfsbyname.3 8.3 (Berkeley) 05/04/95 768720Smckusick.\" 868720Smckusick.Dd 9*69267Smckusick.Dt GETVFSBYNAME 3 1068720Smckusick.Os 1168720Smckusick.Sh NAME 12*69267Smckusick.Nm getvfsbyname 1368720Smckusick.Nd get information about a filesystem 1468720Smckusick.Sh SYNOPSIS 1568720Smckusick.Fd #include <sys/types.h> 1668720Smckusick.Fd #include <sys/mount.h> 1768720Smckusick.Fd #include <kvm.h> 1868720Smckusick.br 1968720Smckusick.Ft int 20*69267Smckusick.Fn getvfsbyname "const char *name" "struct vfsconf *vfc" 2168720Smckusick.Sh DESCRIPTION 2268720SmckusickThe 23*69267Smckusick.Fn getvfsbyname 2468720Smckusickfunction provides access to information about a 2568720Smckusickfilesystem module that is configured in the kernel. 2668720SmckusickIf successful, 2768720Smckusickthe requested filesystem 2868720Smckusick.Fa vfsconf 2968720Smckusickis returned in the location pointed to by 3068720Smckusick.Nm vfc . 3168720SmckusickThe fields in a 3268720Smckusick.Dq Li struct vfsconf 3368720Smckusickare defined as follows: 3468720Smckusick.Pp 3568720Smckusick.Bl -tag -compact -width vfc_refcount 3668720Smckusick.It vfc_name 3768720Smckusickthe name of the filesystem 3869263Smckusick.It vfc_typenum 3968720Smckusickthe filesystem type number assigned by the kernel 4068720Smckusick.It vfc_refcount 4168720Smckusickthe number of active mount points using the filesystem 4268720Smckusick.It vfc_flags 4368720Smckusickflag bits that are used to initialize a new mount point 4468720Smckusickusing the filesystem 4568720Smckusick.El 4668720Smckusick.Sh RETURN VALUES 4768720SmckusickIf the call to 4868720Smckusick.Nm getvfsbyname 4968720Smckusickis successful, 0 is returned. 5068720SmckusickOtherwise \-1 is returned and 5168720Smckusick.Va errno 5268720Smckusickis set appropriately. 5368720Smckusick.Sh ERRORS 5468720SmckusickThe following errors may be reported: 5568720Smckusick.Bl -tag -width Er 5668720Smckusick.It Bq Er EFAULT 5768720SmckusickThe 5868720Smckusick.Fa vfc 5968720Smckusickpointer contains an invalid address. 6068720Smckusick.It Bq Er ENOENT 6168720SmckusickThe 6268720Smckusick.Fa name 6368720Smckusickspecifies a filesystem that is unknown or not configured in the kernel. 6468720Smckusick.Sh SEE ALSO 6568720Smckusick.Xr sysctl 1 , 6668720Smckusick.Xr mount 2 , 6768720Smckusick.Xr sysctl 3 , 6868720Smckusick.Xr mount 8 6968720Smckusick.Sh HISTORY 7068720SmckusickA variant of the 7168720Smckusick.Fn getvfsbyname 7268720Smckusickfunction first appeared in FreeBSD 2.0. 73