diff options
author | Christoph Egger <Christoph.Egger@amd.com> | 2009-07-17 15:23:51 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-07-22 10:58:49 -0500 |
commit | 6225cfaa9511dfea0cd4e3a448cf34d041a647f3 (patch) | |
tree | cc4e68c5a77b02ab46727198e45652c58ce67b12 /pc-bios | |
parent | c397ba2eb1d23dd606b14cb3bf587cda7d102525 (diff) | |
download | qemu-6225cfaa9511dfea0cd4e3a448cf34d041a647f3.tar.gz qemu-6225cfaa9511dfea0cd4e3a448cf34d041a647f3.tar.bz2 qemu-6225cfaa9511dfea0cd4e3a448cf34d041a647f3.zip |
signrom.sh: portability fix
Attached patch makes signrom.sh working on NetBSD.
The output of the 'od' command leads to a syntax error
which breaks the build.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'pc-bios')
-rwxr-xr-x | pc-bios/optionrom/signrom.sh | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pc-bios/optionrom/signrom.sh b/pc-bios/optionrom/signrom.sh index 263ba5ffc9..4322811372 100755 --- a/pc-bios/optionrom/signrom.sh +++ b/pc-bios/optionrom/signrom.sh @@ -31,9 +31,10 @@ x=`dd if="$1" bs=1 count=1 skip=2 2>/dev/null | od -t u1 -A n` size=$(( $x * 512 - 1 )) # now get the checksum -for i in `od -A n -t u1 -v "$1"`; do +nums=`od -A n -t u1 -v "$1"` +for i in ${nums}; do # add each byte's value to sum - sum=$(( $sum + $i )) + sum=`expr $sum + $i` done sum=$(( $sum % 256 )) |