wok diff syslinux/stuff/iso2exe/iso2exe.sh @ rev 17491
syslinux/iso2exe: speedup crc
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Jan 02 21:46:16 2015 +0100 (2015-01-02) |
parents | 054f70cb9bec |
children | aa46cf9cc35a |
line diff
1.1 --- a/syslinux/stuff/iso2exe/iso2exe.sh Thu Jan 01 22:09:19 2015 +0100 1.2 +++ b/syslinux/stuff/iso2exe/iso2exe.sh Fri Jan 02 21:46:16 2015 +0100 1.3 @@ -235,14 +235,9 @@ 1.4 add_fdbootstrap $1 1.5 printf "%d free bytes in %04X..%04X\n" $(($OFS-$HOLE)) $HOLE $OFS 1.6 store 26 ${RANDOM:-0} $1 1.7 - i=66 1.8 - n=0 1.9 echo -n "Adding checksum..." 1.10 - while [ $i -lt 32768 ]; do 1.11 - n=$(($n + $(get $i $1) )) 1.12 - i=$(($i + 2)) 1.13 - done 1.14 - store 64 -$n $1 1.15 + store 64 $(od -v -j 66 -N 32702 -t u2 -w2 -An $1 | \ 1.16 + awk '{ i+= $0 } END { print -(i % 65536) }') $1 1.17 echo " done." 1.18 } 1.19