Date: Fri, 17 Sep 2004 10:14:16 +0200 From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: Alexey Dokuchaev <danfe@nsu.ru> Cc: freebsd-arch@freebsd.org Subject: Re: New libutil function: parse_capacity(3). Message-ID: <20040917081416.GL30151@darkness.comp.waw.pl> In-Reply-To: <20040917040445.GA52078@regency.nsu.ru> References: <20040916184201.GD30151@darkness.comp.waw.pl> <20040917040445.GA52078@regency.nsu.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] On Fri, Sep 17, 2004 at 11:04:45AM +0700, Alexey Dokuchaev wrote: +> > 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). Fell free to suggest a better one:) I talked about this name with few people before name was choosen and this is the list of proposals: - dehumanize_number(), - read_humanized_number(), - parse_humanized_humber(), - computerize_number(), - digitalize_number(), - obfuscate_number(), - parse_capacity(), - parse_number(). :) I really don't want to start bikeshed about function name here. -- 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) iD8DBQFBSpzYForvXbEpPzQRAjIyAKCBJL/3Ijji5EF+cnE+JocgHF1XAQCg2Au2 Btgo93906PU22Yh9nMLWp6Q= =55fO -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040917081416.GL30151>
