Date: Fri, 18 Apr 2014 09:38:46 -0700 From: David Wolfskill <david@catwhisker.org> To: Sergey Matveychuk <sem@semmy.ru> Cc: hackers@freebsd.org Subject: Re: statfs(2) Message-ID: <20140418163846.GF38950@albert.catwhisker.org> In-Reply-To: <53514ED2.2060904@semmy.ru> References: <53514ED2.2060904@semmy.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
--aZoGpuMECXJckB41 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Apr 18, 2014 at 08:12:02PM +0400, Sergey Matveychuk wrote: > Hi. >=20 > Tell me please, why f_bfree is unsigned and f_bavail is signed? >=20 > 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 --=20 David H. Wolfskill david@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. --aZoGpuMECXJckB41 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQJ8BAEBCgBmBQJTUVUVXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ4RThEMDY4QTIxMjc1MDZFRDIzODYzRTc4 QTY3RjlDOERFRjQxOTNCAAoJEIpn+cje9Bk7i9MP/0THV1K1IUw3hiv2/Etg1Hp1 2tqRDUdrhMpyknnbje6cBphV+ggyWXbwdDe2WjoRmx503faQstmSMZTqC6ATLiaV p2LRMdoC1Z/zpTjYBkHqBgoNP2coHSe9KMlbOxu90a1WU+AzdeyCXVNudonV6owp MZeTJGwv16FnE/nKthJpm6BuLHPo+qpI2H2ZLP6j5s4JR1CaC6L93VlYwjuIebBJ VASuSSyUf7SjiH78XTgrO0vBDDjSDykUQCFJYJQsSmk3HflBJQwb9AW0mDmnlXce MUo3oal0CjfMaU3BFXbjC5A6pf7Y8LOofF5iUTL4y8paGIzyOJMJqXhOn3DWAcpi ItlmzZAEJECjOlsk8L5y97GutAkPwUj4Sd0EdqrII3Rc7Wou4pml+XJKnjlIuB7c 2PFtWoWZytBQDAdGOi3EzvjCs0CFgHV3zd8JlukSIOuRJYlSV0Sd5QLPJq3pXOmI Un7pkmFedg8BMyj/65K1bzpRsNf5LhUTb9QMkO2KjEoI1eQKBd8IYHj4MsK7l1IV bUDwkelMT6Ih+iqyslmFQcK0ies7vTJTsYKxlublFTYWsl9irqJn/7yBTW0VC3qR Pk4OH011l0ZHYybHFtf43o5Z+aqh21iAFK2Au45tNPl5x8p7nXwvMv1uXQCJKOeH 7GMv6xDxBPW/SqLb1E0H =xzM8 -----END PGP SIGNATURE----- --aZoGpuMECXJckB41--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140418163846.GF38950>