wok-6.x rev 19324
syslinux: adjust custom conf location
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu Jul 14 10:28:07 2016 +0200 (2016-07-14) |
parents | 3432c28d8372 |
children | abdd572ba26d |
files | syslinux/stuff/iso2exe/init syslinux/stuff/iso2exe/iso2exe.c syslinux/stuff/iso2exe/iso2exe.sh syslinux/stuff/iso2exe/taziso |
line diff
1.1 --- a/syslinux/stuff/iso2exe/init Thu Jul 14 10:16:48 2016 +0200 1.2 +++ b/syslinux/stuff/iso2exe/init Thu Jul 14 10:28:07 2016 +0200 1.3 @@ -680,7 +680,7 @@ 1.4 1.5 customsector() 1.6 { 1.7 - echo $(($(get 32848 "/mnt/$ISO" 4)+16)) 1.8 + echo $(get 32848 "/mnt/$ISO" 4) 1.9 } 1.10 1.11 hascustomconf()
2.1 --- a/syslinux/stuff/iso2exe/iso2exe.c Thu Jul 14 10:16:48 2016 +0200 2.2 +++ b/syslinux/stuff/iso2exe/iso2exe.c Thu Jul 14 10:28:07 2016 +0200 2.3 @@ -49,7 +49,7 @@ 2.4 static unsigned long getcustomsector(void) 2.5 { 2.6 readsector(16UL); 2.7 - return 16UL + LONG(buffer + 80); 2.8 + return LONG(buffer + 80); 2.9 } 2.10 2.11 static int skipmd5 = 0;
3.1 --- a/syslinux/stuff/iso2exe/iso2exe.sh Thu Jul 14 10:16:48 2016 +0200 3.2 +++ b/syslinux/stuff/iso2exe/iso2exe.sh Thu Jul 14 10:28:07 2016 +0200 3.3 @@ -205,7 +205,7 @@ 3.4 3.5 custom_config_sector() 3.6 { 3.7 - echo $(($(get 32848 "$1" 4)+16)) 3.8 + get 32848 "$1" 4 3.9 } 3.10 3.11 clear_custom_config() 3.12 @@ -497,7 +497,7 @@ 3.13 if [ $newsz -gt $isosz ]; then 3.14 echo "$(($newsz - $isosz)) extra bytes." 3.15 else 3.16 - echo "$(($isosz - 32768 - 2048*$(get 32848 $1 4) 3.17 + echo "$(($isosz - 2048*$(get 32848 $1 4) 3.18 - $(stat -c %s $DATA) - 24)) bytes free." 3.19 fi 3.20 rm -f $DATA > /dev/null
4.1 --- a/syslinux/stuff/iso2exe/taziso Thu Jul 14 10:16:48 2016 +0200 4.2 +++ b/syslinux/stuff/iso2exe/taziso Thu Jul 14 10:28:07 2016 +0200 4.3 @@ -854,12 +854,13 @@ 4.4 4.5 customsector() 4.6 { 4.7 - echo $(($(get 32848 "$ISO" 4)+16)) 4.8 + local c=$(echo $(get 32848 "$ISO" 4)) 4.9 + hascustomconf $(($c+16)) && echo $(($c+16)) || echo $c 4.10 } 4.11 4.12 hascustomconf() 4.13 { 4.14 - [ "$(ddq bs=2k skip=$(customsector) if="$ISO" | ddq bs=1 count=6)" \ 4.15 + [ "$(ddq bs=2k skip=${1:-$(customsector)} if="$ISO" | ddq bs=1 count=6)" \ 4.16 == "#!boot" ] 4.17 } 4.18