xfs
[Top] [All Lists]

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

To: Eric Sandeen <sandeen@xxxxxxxxxxx>
Subject: Re: [PATCH 18/19] mkfs: unit conversions are case insensitive
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Fri, 8 Apr 2016 11:03:18 +1000
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <5706FE56.7060308@xxxxxxxxxxx>
References: <1458818136-56043-1-git-send-email-jtulak@xxxxxxxxxx> <1458818136-56043-19-git-send-email-jtulak@xxxxxxxxxx> <57057B2A.3000100@xxxxxxxxxxx> <CACj3i736w-nnDzBDOiBf39cJ3AUHqeVL9_Y8EbUgaMa9S7PToA@xxxxxxxxxxxxxx> <5706FE56.7060308@xxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
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(

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>