[PATCH 18/19] mkfs: unit conversions are case insensitive

Jan Tulak jtulak at redhat.com
Thu Apr 7 05:50:23 CDT 2016


On Wed, Apr 6, 2016 at 11:10 PM, Eric Sandeen <sandeen at sandeen.net> wrote:

> On 3/24/16 6:15 AM, jtulak at redhat.com wrote:
> > From: Jan Tulak <jtulak at redhat.com>
> >
> > Solves the question "Should I use 10g or 10G?"
>
> Might be nicer to do it like the cvtnum in libxcmd:
>
>         c = tolower(*sp);
>         switch (c) {
>         case 'b':
>                 return i * blocksize;
> ...
>
​Yeah, changed.
​


>
> (hm, why do we have 3 copies of cvtnum?)
>

​Where? ​
 ​

​$ pwd
​/some/path/xfsprogs-dev

$ grep -r "cvtnum(size_t" . |grep -v "^Binary"
​./include/input.h:extern long long cvtnum(size_t blocksize, size_t
sectorsize, char *s);
./io/init.h:extern void init_cvtnum(size_t *blocksize, size_t *sectsize);

-- 
Jan Tulak
jtulak at redhat.com / jan at tulak.me
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://oss.sgi.com/pipermail/xfs/attachments/20160407/3e901248/attachment-0001.html>


More information about the xfs mailing list