Date: Fri, 17 Sep 2004 01:03:25 +0200 From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: Giorgos Keramidas <keramida@freebsd.org> Cc: freebsd-arch@freebsd.org Subject: Re: New libutil function: parse_capacity(3). Message-ID: <20040916230325.GJ30151@darkness.comp.waw.pl> In-Reply-To: <20040916224929.GA50482@gothmog.gr> References: <20040916184201.GD30151@darkness.comp.waw.pl> <20040916224929.GA50482@gothmog.gr>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] On Fri, Sep 17, 2004 at 01:49:29AM +0300, Giorgos Keramidas wrote: +> On 2004-09-16 20:42, Pawel Jakub Dawidek <pjd@freebsd.org> wrote: +> > http://people.freebsd.org/~pjd/patches/parse_capacity.patch +> > Any comments before committing? +> +> 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 '== 0', '<= 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... :) -- Pawel Jakub Dawidek http://www.FreeBSD.org pjd@FreeBSD.org http://garage.freebsd.pl FreeBSD committer Am I Evil? Yes, I Am! [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFBShu9ForvXbEpPzQRAousAKCSU2rhdHDlPpaGK2EgaX/2guLMbACfaLXe lAm1UdcnEx1Lx1RP7ctmLsg= =TIuk -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040916230325.GJ30151>
