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

Dave Chinner david at fromorbit.com
Thu Apr 7 20:03:18 CDT 2016


On Thu, Apr 07, 2016 at 07:41:58PM -0500, Eric Sandeen wrote:
> On 4/7/16 5:50 AM, Jan Tulak wrote:
> > On Wed, Apr 6, 2016 at 11:10 PM, Eric Sandeen <sandeen at sandeen.net <mailto:sandeen at sandeen.net>>wrote:
> >     (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);
> 
>   File              	Line
> 0 estimate/xfs_estimate.c   29 cvtnum(char *s)
> 1 libxcmd/input.c          147 cvtnum(
> 2 mkfs/xfs_mkfs.c         3618 cvtnum(

FWIW, here's why we put the function name at the start of the line,
rather than the way that it is typically done in the kernel code
(i.e. after the return type specification):

$ git grep ^cvtnum
estimate/xfs_estimate.c:cvtnum(char *s)
libxcmd/input.c:cvtnum(
mkfs/xfs_mkfs.c:cvtnum(

Cheers,

Dave.
-- 
Dave Chinner
david at fromorbit.com



More information about the xfs mailing list