From owner-freebsd-arch@FreeBSD.ORG Thu Sep 16 23:03:28 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AC82216A4CE; Thu, 16 Sep 2004 23:03:28 +0000 (GMT) Received: from darkness.comp.waw.pl (darkness.comp.waw.pl [195.117.238.136]) by mx1.FreeBSD.org (Postfix) with ESMTP id 45A2743D48; Thu, 16 Sep 2004 23:03:28 +0000 (GMT) (envelope-from pjd@darkness.comp.waw.pl) Received: by darkness.comp.waw.pl (Postfix, from userid 1009) id AFBD9AC995; Fri, 17 Sep 2004 01:03:25 +0200 (CEST) Date: Fri, 17 Sep 2004 01:03:25 +0200 From: Pawel Jakub Dawidek To: Giorgos Keramidas Message-ID: <20040916230325.GJ30151@darkness.comp.waw.pl> References: <20040916184201.GD30151@darkness.comp.waw.pl> <20040916224929.GA50482@gothmog.gr> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="uAyj+rJ4YBxgwLMg" Content-Disposition: inline In-Reply-To: <20040916224929.GA50482@gothmog.gr> User-Agent: Mutt/1.4.2i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 5.2.1-RC2 i386 cc: freebsd-arch@freebsd.org Subject: Re: New libutil function: parse_capacity(3). X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2004 23:03:28 -0000 --uAyj+rJ4YBxgwLMg Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 17, 2004 at 01:49:29AM +0300, Giorgos Keramidas wrote: +> On 2004-09-16 20:42, Pawel Jakub Dawidek wrote: +> > http://people.freebsd.org/~pjd/patches/parse_capacity.patch +> > Any comments before committing? +>=20 +> Is it intentional that it works even for "negative" capacities? Actually I wasn't sure if I should permit for this or deny it. I decided to allow for negative values, because application still have to check the return value, so instead of '=3D=3D 0', '<=3D 0' can be used to detect an error. Simlar problem was for humanize_number(3) - it should support negative values, because avaliable size on file system could be less than 0. With parse_capacity(3) it is a big harder to imagine, but we can add support in the future to growfs(8) to shrink file system when negative value is given or something like this... :) --=20 Pawel Jakub Dawidek http://www.FreeBSD.org pjd@FreeBSD.org http://garage.freebsd.pl FreeBSD committer Am I Evil? Yes, I Am! --uAyj+rJ4YBxgwLMg Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFBShu9ForvXbEpPzQRAousAKCSU2rhdHDlPpaGK2EgaX/2guLMbACfaLXe lAm1UdcnEx1Lx1RP7ctmLsg= =TIuk -----END PGP SIGNATURE----- --uAyj+rJ4YBxgwLMg--