wok rev 23949

syslinux/taziso: typo
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Sep 20 18:21:19 2020 +0000 (2020-09-20)
parents 3996eb426001
children 1a30965ea03c
files syslinux/stuff/iso2exe/taziso
line diff
     1.1 --- a/syslinux/stuff/iso2exe/taziso	Sun Sep 20 16:26:50 2020 +0000
     1.2 +++ b/syslinux/stuff/iso2exe/taziso	Sun Sep 20 18:21:19 2020 +0000
     1.3 @@ -44,9 +44,11 @@
     1.4  word64s2bin()
     1.5  {
     1.6  	for i in $@ ; do
     1.7 -		printf '\\\\x%02X\\\\x%02X\\\\x%02X\\\\x%02X\\\\x%02X\\\\x%02X\\\\x%02X\\\\x%02X' \
     1.8 -			$(($i&255)) $((($i>>8)&255)) $((($i>>16)&255)) $((($i>>24)&255)) \
     1.9 -			$((($i>>32)&255)) $((($i>>40)&255)) $((($i>>48)&255)) $((($i>>56)&255))
    1.10 +#		printf '\\\\x%02X\\\\x%02X\\\\x%02X\\\\x%02X\\\\x%02X\\\\x%02X\\\\x%02X\\\\x%02X' \
    1.11 +#			$(($i&255)) $((($i>>8)&255)) $((($i>>16)&255)) $((($i>>24)&255)) \
    1.12 +#			$((($i>>32)&255)) $((($i>>40)&255)) $((($i>>48)&255)) $((($i>>56)&255))
    1.13 +		printf '\\\\x%02X\\\\x%02X\\\\x%02X\\\\x%02X\\\\x00\\\\x00\\\\x00\\\\x00' $(($i&255)) \
    1.14 +			$((($i>>8)&255)) $((($i>>16)&255)) $((($i>>24)&255))
    1.15  	done | xargs echo -en
    1.16  }
    1.17  
    1.18 @@ -78,7 +80,7 @@
    1.19  	*)  set -- $(dirname "$1")/$(readlink "$1") ;;
    1.20  	esac
    1.21  	[ ! -b "$1" ] && echo $(stat -c %s "$1") ||
    1.22 -	echo $(($(cat /sys/block/${1#/dev/}/size)*512)
    1.23 +	echo $(($(cat /sys/block/${1#/dev/}/size)*512))
    1.24  }
    1.25  
    1.26  uncpio()
    1.27 @@ -1175,7 +1177,7 @@
    1.28  	t248=B3667A2E; t249=C4614AB8; t250=5D681B02; t251=2A6F2B94;
    1.29  	t252=B40BBE37; t253=C30C8EA1; t254=5A05DF1B; t255=2D02EF8D;
    1.30  	crc=$((0xFFFFFFFF))
    1.31 -	dd if=$iso bs=1 skip=$(($1)) count=$(($2)) 2> /dev/null | \
    1.32 +	dd if="$ISO" bs=1 skip=$(($1)) count=$(($2)) 2> /dev/null | \
    1.33  	od -v -w1 -t u1 -An | {
    1.34  		while read n; do
    1.35  			local x=$((($crc ^ $n) & 255))
    1.36 @@ -1229,14 +1231,17 @@
    1.37  	[ $custom -gt $(($last-4)) ] && last=$(($custom+4))		# room for cmdline
    1.38  	word64s2bin $last | ddq bs=1 seek=$((1024+128+32)) of=$device	# vfat first address
    1.39  	word64s2bin $(($sectors-3)) | ddq bs=1 seek=$((1024+128+40)) of=$device	# vfat last address
    1.40 -	word32s2bin $(gpt_crc32 1024 $(($(get 596 $device 4)*$(get 592 $device 4)))) | ddq bs=1 seek=$((512+88))	# CRC32 partitions
    1.41 +	word32s2bin $(gpt_crc32 1024 $(($(get 596 $device 4)*$(get 592 $device 4)))) | \
    1.42 +		ddq bs=1 seek=$((512+88)) of=$device	# CRC32 partitions
    1.43  	ddn of=$device if=$device bs=512 skip=1 seek=$(($sectors-1)) count=1
    1.44  	ddn of=$device if=$device bs=512 skip=2 seek=$(($sectors-2)) count=1
    1.45  	word64s2bin $(($sectors-1)) 1 | ddq bs=1 seek=$(($sectors*512-512+24)) of=$device	# my gpt, alt gpt
    1.46  	word64s2bin $(($sectors-1)) | ddq bs=1 seek=$((512+32)) of=$device	# alt gpt
    1.47  	word64s2bin $(($sectors-2)) | ddq bs=1 seek=$(($sectors*512-512+72)) of=$device
    1.48 -	word32s2bin $(gpt_crc32 $(($sectors*512-512)) $(get 525 $device 4)) | ddq bs=1 seek=$(($sectors*512-512+16))	# CRC32 header
    1.49 -	word32s2bin $(gpt_crc32 512 $(get 524 $device 4)) | ddq bs=1 seek=$((512+16))	# CRC32 header
    1.50 +	word32s2bin $(gpt_crc32 $(($sectors*512-512)) $(get 524 $device 4)) | \
    1.51 +		ddq bs=1 seek=$(($sectors*512-512+16)) of=$device	# CRC32 header
    1.52 +	word32s2bin $(gpt_crc32 512 $(get 524 $device 4)) | \
    1.53 +		ddq bs=1 seek=$((512+16)) of=$device	# CRC32 header
    1.54  	partprobe $device
    1.55  	homedev=/dev/$(basename /sys/block/${device#/dev/}/${device#/dev/}*2)
    1.56  	mkdosfs -n 'SLITAZ HOME' $homedev