Date: Fri, 17 Sep 2004 11:04:45 +0700 From: Alexey Dokuchaev <danfe@nsu.ru> To: Pawel Jakub Dawidek <pjd@freebsd.org> Cc: freebsd-arch@freebsd.org Subject: Re: New libutil function: parse_capacity(3). Message-ID: <20040917040445.GA52078@regency.nsu.ru> In-Reply-To: <20040916184201.GD30151@darkness.comp.waw.pl> References: <20040916184201.GD30151@darkness.comp.waw.pl>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Sep 16, 2004 at 08:42:01PM +0200, Pawel Jakub Dawidek wrote: > Hello. > > I implemented parse_capacity() function which can be use to convert a > string with a human-readable capacity value to a off_t value. > > It can be used by utilities like: > > % truncate -s 8g test > # mdconfig -a -t malloc -s 16M > > Patch can be found here: > > http://people.freebsd.org/~pjd/patches/parse_capacity.patch > > Any comments before committing? Methinks you could probably come up with a better name, since "engeneering number mode" (using K, M, T, etc) is used for bandwidth, for instance, not just for `capacity'. IMHO. Making it that user can easily guess its name from already-there humanize_number(3). ./danfe
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040917040445.GA52078>