wok rev 25456

BootProg: fix fat16 case
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Sep 22 14:50:47 2022 +0000 (2022-09-22)
parents 002a704d9c02
children ad0bc3efbf37
files BootProg/stuff/boot16.asm BootProg/stuff/bootprog.sh
line diff
     1.1 --- a/BootProg/stuff/boot16.asm	Thu Sep 22 09:40:04 2022 +0000
     1.2 +++ b/BootProg/stuff/boot16.asm	Thu Sep 22 14:50:47 2022 +0000
     1.3 @@ -309,11 +309,7 @@
     1.4  TINYFAT16   	equ       1
     1.5          push    di                      ; up to 2 * 635K / BytesPerCluster = 2540 bytes
     1.6  %if FAT12 == 1
     1.7 - %if TINYFAT16 == 0 && FAT16 == 1
     1.8          mov     cl, 12
     1.9 - %else
    1.10 -        mov     cl, 4
    1.11 - %endif
    1.12  %endif
    1.13  ClusterLoop:
    1.14          mov     [di], si
    1.15 @@ -349,11 +345,7 @@
    1.16  %endif
    1.17  %if FAT12 == 1
    1.18          jnc     ReadClusterEven
    1.19 - %if TINYFAT16 == 0 && FAT16 == 1
    1.20          rol     ax, cl
    1.21 - %else
    1.22 -        shr     ax, cl
    1.23 - %endif
    1.24  ReadClusterEven:
    1.25          scasw                           ; di += 2
    1.26   %if FAT16 == 1
     2.1 --- a/BootProg/stuff/bootprog.sh	Thu Sep 22 09:40:04 2022 +0000
     2.2 +++ b/BootProg/stuff/bootprog.sh	Thu Sep 22 14:50:47 2022 +0000
     2.3 @@ -11,6 +11,7 @@
     2.4  	echo "Install $f bootsector on $1."
     2.5  	for a in "$o skip=$((o+b)) count=$((512-o))" "0 skip=$b count=11"
     2.6  	do sed '1,/^exit/d' $0 | unlzma | $w=$a; done
     2.7 +	echo -n $f | $w=$c
     2.8  	[ "$2" ] && echo "Set boot file '$2'" && echo -n "$2" | case "$f" in
     2.9  	E*)	sed 's| |.|;s| ||g' | cat - /dev/zero;;
    2.10  	*)	tr a-z A-Z | sed 's|\.|       |;s|^\(.\{8\}\) *|\1|;s|$|   |'
    2.11 @@ -23,9 +24,9 @@
    2.12  	esac
    2.13  	exit 0
    2.14  done<<S 2>/dev/null
    2.15 -54	54	0	FAT12
    2.16 -54	54	0	FAT16
    2.17 -82	82	512	FAT32
    2.18 +54	59	0	FAT12
    2.19 +54	59	0	FAT16
    2.20 +82	87	512	FAT32
    2.21  3	113	1024	EXFAT
    2.22  S
    2.23  exit 1