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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Apr 8, 2016 at 3:03 AM, Dave Chinner <david@xxxxxxxxxxxxx> wrote:
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@xxxxxxxxxxx <mailto:sandeen@xxxxxxxxxxx>>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(


​Ah, I see. A nice trick. :-)

It might be good to merge the three functions, but I think it can wait for when this patchset is done - or there is always going to be something more to add... 

Thanks,
Jan ​
 
--
_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs

[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux