diff options
author | jhb <jhb@FreeBSD.org> | 2017-02-08 18:32:35 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2017-02-08 18:32:35 +0000 |
commit | 35b15de17b53838c6a73dcbb7af21c1d3cac3c11 (patch) | |
tree | 132262bb0c2f8d194e47f5c0f818a8e361c9e4af /lib/libc/sys | |
parent | 9921ea670c139b76859e2dfa7110c594cb0b355e (diff) | |
download | FreeBSD-src-35b15de17b53838c6a73dcbb7af21c1d3cac3c11.zip FreeBSD-src-35b15de17b53838c6a73dcbb7af21c1d3cac3c11.tar.gz |
MFC 310638:
Rename the 'flags' argument to getfsstat() to 'mode' and validate it.
This argument is not a bitmask of flags, but only accepts a single value.
Fail with EINVAL if an invalid value is passed to 'flag'. Rename the
'flags' argument to getmntinfo(3) to 'mode' as well to match.
This is a followup to r308088.
Diffstat (limited to 'lib/libc/sys')
-rw-r--r-- | lib/libc/sys/getfsstat.2 | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/libc/sys/getfsstat.2 b/lib/libc/sys/getfsstat.2 index 9d13280..08cdf49 100644 --- a/lib/libc/sys/getfsstat.2 +++ b/lib/libc/sys/getfsstat.2 @@ -28,7 +28,7 @@ .\" @(#)getfsstat.2 8.3 (Berkeley) 5/25/95 .\" $FreeBSD$ .\" -.Dd November 6, 2016 +.Dd December 27, 2016 .Dt GETFSSTAT 2 .Os .Sh NAME @@ -41,7 +41,7 @@ .In sys/ucred.h .In sys/mount.h .Ft int -.Fn getfsstat "struct statfs *buf" "long bufsize" "int flags" +.Fn getfsstat "struct statfs *buf" "long bufsize" "int mode" .Sh DESCRIPTION The .Fn getfsstat @@ -74,11 +74,11 @@ is given as NULL, returns just the number of mounted file systems. .Pp Normally -.Fa flags +.Fa mode should be specified as .Dv MNT_WAIT . If -.Fa flags +.Fa mode is set to .Dv MNT_NOWAIT , .Fn getfsstat @@ -108,6 +108,12 @@ The .Fa buf argument points to an invalid address. +.It Bq Er EINVAL +.Fa mode +is set to a value other than +.Dv MNT_WAIT +or +.Dv MNT_NOWAIT . .It Bq Er EIO An .Tn I/O |