X-Spam-Checker-Version: SpamAssassin 3.4.0-r929098 (2010-03-30) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.4.0-r929098 Received: from cuda.sgi.com (cuda2.sgi.com [192.48.176.25]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id q0OHwJK5060190 for ; Tue, 24 Jan 2012 11:58:19 -0600 X-ASG-Debug-ID: 1327427897-04cbb00c4869ea0001-NocioJ Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by cuda.sgi.com with ESMTP id U1CPFzxhToQfZJJv for ; Tue, 24 Jan 2012 09:58:18 -0800 (PST) X-Barracuda-Envelope-From: sandeen@redhat.com X-Barracuda-Apparent-Source-IP: 209.132.183.28 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q0OHwDwj004093 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 24 Jan 2012 12:58:13 -0500 Received: from liberator.sandeen.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q0OHwCO1024113 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Tue, 24 Jan 2012 12:58:13 -0500 Message-ID: <4F1EF134.7000808@redhat.com> Date: Tue, 24 Jan 2012 11:58:12 -0600 From: Eric Sandeen User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:9.0) Gecko/20111222 Thunderbird/9.0.1 MIME-Version: 1.0 To: Christoph Hellwig CC: xfs-oss , James Lawrie Subject: Re: [PATCH] xfsprogs: check for size parsing errors in xfs_quota References: <4F1D9989.8060808@redhat.com> <20120124175612.GH9853@infradead.org> X-ASG-Orig-Subj: Re: [PATCH] xfsprogs: check for size parsing errors in xfs_quota In-Reply-To: <20120124175612.GH9853@infradead.org> X-Enigmail-Version: 1.3.4 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Barracuda-Connect: mx1.redhat.com[209.132.183.28] X-Barracuda-Start-Time: 1327427897 X-Barracuda-URL: http://192.48.176.25:80/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at sgi.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.86577 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 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