statfs(2)
David Wolfskill
david at catwhisker.org
Fri Apr 18 16:38:49 UTC 2014
On Fri, Apr 18, 2014 at 08:12:02PM +0400, Sergey Matveychuk wrote:
> Hi.
>
> Tell me please, why f_bfree is unsigned and f_bavail is signed?
>
> struct statfs {
> ...
> uint64_t f_bfree; /* free blocks in filesystem */
> int64_t f_bavail; /* free blocks avail to non-superuser */
> ...
> ...
f_bavail can be negative. f_bfree cannot.
If f_bavail were "free blocks avail" (that is, without the "to
non-superuser" qualification), then it would always be non-negative too.
But it's not.
Peace,
david
--
David H. Wolfskill david at catwhisker.org
Taliban: Evil cowards with guns afraid of truth from a 14-year old girl.
See http://www.catwhisker.org/~david/publickey.gpg for my public key.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 964 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20140418/1d1c4ed6/attachment.sig>
More information about the freebsd-hackers
mailing list