From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MSmpa-0006JL-DY for qemu-devel@nongnu.org; Mon, 20 Jul 2009 02:58:38 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MSmpV-0006FZ-Mv for qemu-devel@nongnu.org; Mon, 20 Jul 2009 02:58:37 -0400 Received: from [199.232.76.173] (port=54243 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MSmpV-0006FL-B6 for qemu-devel@nongnu.org; Mon, 20 Jul 2009 02:58:33 -0400 Received: from mx20.gnu.org ([199.232.41.8]:39242) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MSmpU-0007sj-Mk for qemu-devel@nongnu.org; Mon, 20 Jul 2009 02:58:32 -0400 Received: from [217.9.48.20] (helo=donner.amd.com) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MSmpR-00046g-E7 for qemu-devel@nongnu.org; Mon, 20 Jul 2009 02:58:29 -0400 Content-Disposition: inline From: Christoph Egger Subject: Re: [Qemu-devel] [PATCH] signrom.sh: portability fix Date: Fri, 17 Jul 2009 18:06:13 +0200 MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200907171806.13974.Christoph.Egger@amd.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, Alexander Graf On Friday 17 July 2009 16:37:38 Alexander Graf wrote: > On 17.07.2009, at 15:23, Christoph Egger wrote: > > Hi! > > > > Attached patch makes signrom.sh working on NetBSD. > > The output of the 'od' command leads to a syntax error > > which breaks the build. > > So why replace the $(( ... )) calculation with expr then? because $i contains some whitespaces and leading zeros. This lets the bourne shell think, $i is a string and doing math with strings results in syntax error. Passing it down into expr trims them. > A few lines below there's another $(( )) that apparently works. $sum is not a string there. > Btw: Inlined patches are very much appreciated :-) Not for me because kmail malforms those with tabs, so that they don't apply cleanly. Christoph -- ---to satisfy European Law for business letters: Advanced Micro Devices GmbH Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen Geschaeftsfuehrer: Thomas M. McCoy, Giuliano Meroni Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632 ------------------------------------------------------- -- ---to satisfy European Law for business letters: Advanced Micro Devices GmbH Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen Geschaeftsfuehrer: Thomas M. McCoy, Giuliano Meroni Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632