From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 18 16:38:49 2014 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1CFACCF0 for ; Fri, 18 Apr 2014 16:38:49 +0000 (UTC) Received: from albert.catwhisker.org (mx.catwhisker.org [198.144.209.73]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BFE55141A for ; Fri, 18 Apr 2014 16:38:48 +0000 (UTC) Received: from albert.catwhisker.org (localhost [127.0.0.1]) by albert.catwhisker.org (8.14.8/8.14.8) with ESMTP id s3IGclW9042133; Fri, 18 Apr 2014 09:38:47 -0700 (PDT) (envelope-from david@albert.catwhisker.org) Received: (from david@localhost) by albert.catwhisker.org (8.14.8/8.14.8/Submit) id s3IGcl5W042132; Fri, 18 Apr 2014 09:38:47 -0700 (PDT) (envelope-from david) Date: Fri, 18 Apr 2014 09:38:46 -0700 From: David Wolfskill To: Sergey Matveychuk Subject: Re: statfs(2) Message-ID: <20140418163846.GF38950@albert.catwhisker.org> References: <53514ED2.2060904@semmy.ru> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="aZoGpuMECXJckB41" Content-Disposition: inline In-Reply-To: <53514ED2.2060904@semmy.ru> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: hackers@freebsd.org X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Apr 2014 16:38:49 -0000 --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--