qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] signrom.sh: portability fix


From: Alexander Graf
Subject: Re: [Qemu-devel] [PATCH] signrom.sh: portability fix
Date: Mon, 20 Jul 2009 09:48:55 +0200


On 17.07.2009, at 18:06, Christoph Egger wrote:

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.

Ok, patch looks fine then.

Acked-By: Alexander Graf <address@hidden>

Btw: Inlined patches are very much appreciated :-)

Not for me because kmail malforms those with tabs,
so that they don't apply cleanly.

Use git-send-email then. It's really no fun to review attached patches.

Alex





reply via email to

[Prev in Thread] Current Thread [Next in Thread]