SYSLINUX: Fix extension-detection for syslinux.
authorH. Peter Anvin <hpa@zytor.com>
Tue, 6 Feb 2007 23:59:49 +0000 (15:59 -0800)
committerH. Peter Anvin <hpa@zytor.com>
Tue, 6 Feb 2007 23:59:49 +0000 (15:59 -0800)
NEWS
ldlinux.asm
ui.inc

diff --git a/NEWS b/NEWS
index 76e516b..43912b7 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -9,6 +9,8 @@ Changes in 3.36:
        * SYSLINUX: "unix" installer now uses Linux ioctls instead of
          using libfat.
        * New MBR which can boot from logical partitions.
+       * SYSLINUX: Fix bug in detecting special extensions which was
+         introduced in 3.35 :(
 
 Changes in 3.35:
        * MEMDISK: New "safeint" mode.
index 733f2ec..0a872c3 100644 (file)
@@ -122,7 +122,6 @@ RootDir             resd 1                  ; Location of root directory proper
 DataArea       resd 1                  ; Location of data area
 RootDirSize    resd 1                  ; Root dir size in sectors
 TotalSectors   resd 1                  ; Total number of sectors
-EndSector      resd 1                  ; Location of filesystem end
 ClustSize      resd 1                  ; Bytes/cluster
 ClustMask      resd 1                  ; Sectors/cluster - 1
 CopySuper      resb 1                  ; Distinguish .bs versus .bss
@@ -794,9 +793,6 @@ genfatinfo:
 .have_secs:
                mov [TotalSectors],edx
 
-               add edx,eax
-               mov [EndSector],edx
-
                mov eax,[bxResSectors]
                mov [FAT],eax                   ; Beginning of FAT
                mov edx,[bxFATsecs]
@@ -834,7 +830,7 @@ genfatinfo:
 ; FAT12, FAT16 or FAT28^H^H32?  This computation is fscking ridiculous.
 ;
 getfattype:
-               mov eax,[EndSector]
+               mov eax,[TotalSectors]
                sub eax,[DataArea]
                shr eax,cl                      ; cl == ClustShift
                mov cl,nextcluster_fat12-(nextcluster+2)
diff --git a/ui.inc b/ui.inc
index 7c68fc5..ad738e3 100644 (file)
--- a/ui.inc
+++ b/ui.inc
@@ -485,10 +485,6 @@ kernel_good:
                mov [KernelCNameLen],di
                popa
 
-%if IS_SYSLINUX || IS_MDSLINUX
-               mov ecx,[KernelName+7]
-               mov cl,'.'
-%else
                push di
                push ax
                mov di,KernelName+4*IS_PXELINUX
@@ -500,7 +496,6 @@ kernel_good:
 .one_step:     mov ecx,[di-4]                  ; 4 bytes before end
                pop ax
                pop di
-%endif
 
 ;
 ; At this point, DX:AX contains the size of the kernel, and SI contains
@@ -522,19 +517,13 @@ kernel_good:
                je is_bss_sector
                cmp ecx,'.bin'
                je is_bootsector
-%if IS_SYSLINUX || IS_MDSLINUX
-               cmp ecx,'.bs '
-               je is_bootsector
-               cmp ecx,'.0  '
-               je is_bootsector
-%else
                shr ecx,8
                cmp ecx,'.bs'
                je is_bootsector
                shr ecx,8
                cmp cx,'.0'
                je is_bootsector
-%endif
+
                ; Otherwise Linux kernel
 
                section .bss