statvfs.3 (304d1f73fe42cfcdd62440886708ff6b79c6975a) statvfs.3 (8d5d039f80a8d31947f4e84af20e8a56d0009c32)
1.\"
2.\" Copyright 2002 Massachusetts Institute of Technology
3.\"
4.\" Permission to use, copy, modify, and distribute this software and
5.\" its documentation for any purpose and without fee is hereby
6.\" granted, provided that both the above copyright notice and this
7.\" permission notice appear in all copies, that both the above
8.\" copyright notice and this permission notice appear in all

--- 20 unchanged lines hidden (view full) ---

29.\" $FreeBSD$
30.\"
31.Dd July 13, 2002
32.Dt STATVFS 3
33.Os
34.Sh NAME
35.Nm statvfs ,
36.Nm fstatvfs
1.\"
2.\" Copyright 2002 Massachusetts Institute of Technology
3.\"
4.\" Permission to use, copy, modify, and distribute this software and
5.\" its documentation for any purpose and without fee is hereby
6.\" granted, provided that both the above copyright notice and this
7.\" permission notice appear in all copies, that both the above
8.\" copyright notice and this permission notice appear in all

--- 20 unchanged lines hidden (view full) ---

29.\" $FreeBSD$
30.\"
31.Dd July 13, 2002
32.Dt STATVFS 3
33.Os
34.Sh NAME
35.Nm statvfs ,
36.Nm fstatvfs
37.Nd retrieve filesystem information
37.Nd retrieve file system information
38.Sh LIBRARY
39.Lb libc
40.Sh SYNOPSIS
41.In sys/statvfs.h
42.Ft int
43.Fn statvfs "const char * restrict path" "struct statvfs * restrict buf"
44.Ft int
45.Fn fstatvfs "int fd" "struct statvfs *buf"
46.Sh DESCRIPTION
47The
48.Fn statvfs
49and
50.Fn fstatvfs
51functions fill the structure pointed to by
52.Fa buf
53with garbage.
38.Sh LIBRARY
39.Lb libc
40.Sh SYNOPSIS
41.In sys/statvfs.h
42.Ft int
43.Fn statvfs "const char * restrict path" "struct statvfs * restrict buf"
44.Ft int
45.Fn fstatvfs "int fd" "struct statvfs *buf"
46.Sh DESCRIPTION
47The
48.Fn statvfs
49and
50.Fn fstatvfs
51functions fill the structure pointed to by
52.Fa buf
53with garbage.
54This garbage will occasionally bear resemblance to filesystem
54This garbage will occasionally bear resemblance to file system
55statistics, but portable applications must not depend on this.
56Applications must pass a pathname or file descriptor which refers to a
55statistics, but portable applications must not depend on this.
56Applications must pass a pathname or file descriptor which refers to a
57file on the filesystem in which they are interested.
57file on the file system in which they are interested.
58.Pp
59The
60.Vt statvfs
61structure contains the following members:
62.Bl -tag -offset indent -width ".Va f_namemax"
63.It Va f_namemax
58.Pp
59The
60.Vt statvfs
61structure contains the following members:
62.Bl -tag -offset indent -width ".Va f_namemax"
63.It Va f_namemax
64The maximum length in bytes of a file name on this filesystem.
64The maximum length in bytes of a file name on this file system.
65Applications should use
66.Xr pathconf 3
67instead.
68.It Va f_fsid
69Not meaningful in this implementation.
70.It Va f_frsize
71The size in bytes of the minimum unit of allocation on this
65Applications should use
66.Xr pathconf 3
67instead.
68.It Va f_fsid
69Not meaningful in this implementation.
70.It Va f_frsize
71The size in bytes of the minimum unit of allocation on this
72filesystem.
72file system.
73(This corresponds to the
74.Va f_bsize
75member of
76.Vt "struct statfs" . )
77.It Va f_bsize
73(This corresponds to the
74.Va f_bsize
75member of
76.Vt "struct statfs" . )
77.It Va f_bsize
78The preferred length of I/O requests for files on this filesystem.
78The preferred length of I/O requests for files on this file system.
79(Corresponds to the
80.Va f_iosize
81member of
82.Vt "struct statfs" . )
83.It Va f_flag
79(Corresponds to the
80.Va f_iosize
81member of
82.Vt "struct statfs" . )
83.It Va f_flag
84Flags describing mount options for this filesystem; see below.
84Flags describing mount options for this file system; see below.
85.El
86.Pp
87In addition, there are three members of type
88.Vt fsfilcnt_t ,
89which represent counts of file serial numbers
90.Em ( i.e. ,
91inodes); these are named
92.Va f_files , f_favail ,

--- 10 unchanged lines hidden (view full) ---

103.Vt fsblkcnt_t )
104represent the respective allocation-block counts.
105.Pp
106There are two flags defined for the
107.Va f_flag
108member:
109.Bl -tag -offset indent -width ".Dv ST_NOSUID"
110.It Dv ST_RDONLY
85.El
86.Pp
87In addition, there are three members of type
88.Vt fsfilcnt_t ,
89which represent counts of file serial numbers
90.Em ( i.e. ,
91inodes); these are named
92.Va f_files , f_favail ,

--- 10 unchanged lines hidden (view full) ---

103.Vt fsblkcnt_t )
104represent the respective allocation-block counts.
105.Pp
106There are two flags defined for the
107.Va f_flag
108member:
109.Bl -tag -offset indent -width ".Dv ST_NOSUID"
110.It Dv ST_RDONLY
111The filesystem is mounted read-only.
111The file system is mounted read-only.
112.It Dv ST_NOSUID
113The semantics of the
114.Dv S_ISUID
115and
116.Dv S_ISGID
117file mode bits
112.It Dv ST_NOSUID
113The semantics of the
114.Dv S_ISUID
115and
116.Dv S_ISGID
117file mode bits
118are not supported by, or are disabled on, this filesystem.
118are not supported by, or are disabled on, this file system.
119.El
120.Sh IMPLEMENTATION NOTES
121The
122.Fn statvfs
123and
124.Fn fstatvfs
125functions are implemented as wrappers around the
126.Fn statfs

--- 20 unchanged lines hidden (view full) ---

147respectively.
148In addition,
149.Fn statvfs
150and
151.Fn fstatvfs
152functions may also fail for the following reason:
153.Bl -tag -width Er
154.It Bq Er EOVERFLOW
119.El
120.Sh IMPLEMENTATION NOTES
121The
122.Fn statvfs
123and
124.Fn fstatvfs
125functions are implemented as wrappers around the
126.Fn statfs

--- 20 unchanged lines hidden (view full) ---

147respectively.
148In addition,
149.Fn statvfs
150and
151.Fn fstatvfs
152functions may also fail for the following reason:
153.Bl -tag -width Er
154.It Bq Er EOVERFLOW
155One or more of the filesystem statistics has a value which cannot be
155One or more of the file system statistics has a value which cannot be
156represented by the data types used in
157.Vt "struct statvfs" .
158.El
159.Sh SEE ALSO
160.Xr statfs 2 ,
161.Xr pathconf 3
162.Sh STANDARDS
163The
164.Fn statvfs
165and
166.Fn fstatvfs
167functions conform to
168.St -p1003.1-2001 .
169As standardized, portable applications cannot depend on these functions
170returning any valid information at all.
171This implementation attempts to provide as much useful information as
156represented by the data types used in
157.Vt "struct statvfs" .
158.El
159.Sh SEE ALSO
160.Xr statfs 2 ,
161.Xr pathconf 3
162.Sh STANDARDS
163The
164.Fn statvfs
165and
166.Fn fstatvfs
167functions conform to
168.St -p1003.1-2001 .
169As standardized, portable applications cannot depend on these functions
170returning any valid information at all.
171This implementation attempts to provide as much useful information as
172is provided by the underlying filesystem, subject to the limitations
172is provided by the underlying file system, subject to the limitations
173of the specified data types.
174.Sh HISTORY
175The
176.Fn statvfs
177and
178.Fn fstatvfs
179functions first appeared in
180.Fx 5.0 .
181.Sh AUTHORS
182The
183.Fn statvfs
184and
185.Fn fstatvfs
186functions and this manual page were written by
187.An Garrett Wollman Aq wollman@FreeBSD.org .
173of the specified data types.
174.Sh HISTORY
175The
176.Fn statvfs
177and
178.Fn fstatvfs
179functions first appeared in
180.Fx 5.0 .
181.Sh AUTHORS
182The
183.Fn statvfs
184and
185.Fn fstatvfs
186functions and this manual page were written by
187.An Garrett Wollman Aq wollman@FreeBSD.org .