[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] signrom.sh: portability fix
From: |
Christoph Egger |
Subject: |
Re: [Qemu-devel] [PATCH] signrom.sh: portability fix |
Date: |
Fri, 17 Jul 2009 18:06:13 +0200 |
User-agent: |
KMail/1.9.7 |
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