wok-current diff memtest/stuff/pack @ rev 15480
memtest: default setup size = 4
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Nov 10 11:19:32 2013 +0000 (2013-11-10) |
parents | d39aa07ef47c |
children | 99c5dab1a371 |
line diff
1.1 --- a/memtest/stuff/pack Sun Nov 10 10:29:13 2013 +0000 1.2 +++ b/memtest/stuff/pack Sun Nov 10 11:19:32 2013 +0000 1.3 @@ -37,10 +37,11 @@ 1.4 uudecode | gunzip >$2 1.5 dd if=$1 bs=1 skip=497 seek=497 count=15 of=$2 conv=notrunc 1.6 setup="$(echo $(od -j 497 -N 1 -dAn $1))" 1.7 + [ $setup -eq 0 ] && setup=4 1.8 syssize="$(echo $(od -j 500 -N 2 -dAn $1))" 1.9 + [ $syssize -eq 0 ] && syssize=$((($(stat -c %s $1) + 15 - 512*($setup + 1))/16)) 1.10 store $syssize $2 XXXO 1.11 store $setup $2 XXXS 1 1.12 - [ $syssize -eq 0 ] && syssize=$((($(stat -c %s $1) + 15 - 512*($setup + 1))/16)) 1.13 dd if=$1 bs=512 count=$setup skip=1 | compress >>$2 1.14 dd if=$1 bs=16 count=$syssize skip=$((32*(1+$setup))) | compress >>$2 1.15 size=$(stat -c %s $2) 1.16 @@ -49,14 +50,13 @@ 1.17 store 4 $2 497 1 1.18 store $((($size+511)/512)) $2 4 1.19 store $((($size+15)/16)) $2 14 1.20 - echo -en "$3" | dd conv=notrunc bs=1 seek=YYY of=$2 count=ZZZ 1.21 + echo -e "$3" | dd conv=notrunc bs=1 seek=YYY of=$2 count=ZZZ 1.22 } 1.23 1.24 HELP="$(unix2dos <<EOT 1.25 Memtest86+ is an endless advanced memory diagnostic tool released under the 1.26 terms of the Gnu Public License (GPL). 1.27 1.28 - 1.29 EOT 1.30 )" 1.31 main $1 ${2:-$1.packed} "${3:-$HELP}" 2>/dev/null <<EOT