xfs
[Top] [All Lists]

Re: [PATCH] xfsprogs: check for size parsing errors in xfs_quota

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH] xfsprogs: check for size parsing errors in xfs_quota
From: Eric Sandeen <sandeen@xxxxxxxxxx>
Date: Tue, 24 Jan 2012 11:58:12 -0600
Cc: xfs-oss <xfs@xxxxxxxxxxx>, James Lawrie <james@xxxxxxxxxxxxxx>
In-reply-to: <20120124175612.GH9853@xxxxxxxxxxxxx>
References: <4F1D9989.8060808@xxxxxxxxxx> <20120124175612.GH9853@xxxxxxxxxxxxx>
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:9.0) Gecko/20111222 Thunderbird/9.0.1
On 1/24/12 11:56 AM, Christoph Hellwig wrote:
>> -            v = (__uint64_t)cvtnum(blocksize, sectorsize, s);
>> -            *value = v >> 9;        /* syscalls use basic blocks */
>> +            v = cvtnum(blocksize, sectorsize, s);
>> +            if (v == -1LL) {
>> +                    fprintf(stderr, _("%s: Error: could not parse size 
>> %s.\n"), progname, s);
>> +                    return 0;
>> +            }
>> +            *value = (__uint64_t)v >> 8;    /* syscalls use basic blocks */
> 
> Why do you replace the shift by nine with a shift by 8?

yeargh, NFI - vi gone wild?

> Also please don't introduce new overly long lines, just move the
> translated string to a line of its own, indented by a single tab similar
> to how we do it in most new xfs/xfsprogs code.

Ok, sure, sorry.  TBH I noticed it but there was such a long line below
I didn't worry.  Will resend.

-Eric

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