mirror of
https://github.com/qemu/qemu.git
synced 2024-11-25 03:43:37 +08:00
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>
This commit is contained in:
parent
a61d1f6701
commit
99772ae208
@ -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 ))
|
||||
|
Loading…
Reference in New Issue
Block a user