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 | 99772ae20895e9c72e15f8bef89c60fadd7eb0da (patch) | |
tree | cc4e68c5a77b02ab46727198e45652c58ce67b12 /pc-bios | |
parent | notify io_thread at the end of rx handling (diff) | |
download | qemu-kvm-99772ae20895e9c72e15f8bef89c60fadd7eb0da.tar.gz qemu-kvm-99772ae20895e9c72e15f8bef89c60fadd7eb0da.tar.bz2 qemu-kvm-99772ae20895e9c72e15f8bef89c60fadd7eb0da.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 263ba5ffc..432281137 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 )) |