We have space in the boot sector to check the file-ness of LDLINUX.SYS
authorhpa <hpa>
Wed, 13 May 1998 02:03:19 +0000 (02:03 +0000)
committerhpa <hpa>
Wed, 13 May 1998 02:03:19 +0000 (02:03 +0000)
now; use it.

NEWS
ldlinux.asm
version

diff --git a/NEWS b/NEWS
index 712272f..4a2fcf8 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,7 @@
+Changes in 1.41:
+       * Don't get confused by directories, volume labels, or VFAT
+         long names.
+
 Changes in 1.40:
        * Increase A20M delay and put in a test to avoid problems on
          certain IBM Thinkpads (thanks to Donnie Barnes of RedHat
index 9185bec..a5d7646 100644 (file)
@@ -547,13 +547,15 @@ sd_nextsec:       push ax
                pop si
 sd_nextentry:  cmp byte [si],0         ; Directory high water mark
                je kaboom
+               test byte [si+11],18h   ; Must be a file
+               jnz sd_not_file
                mov di,ldlinux_name
                mov cx,11
                push si
                repe cmpsb
                pop si
                je found_it
-               add si,byte 32          ; Distance to next
+sd_not_file:   add si,byte 32          ; Distance to next
                cmp si,[EndofDirSec]
                jb sd_nextentry
                pop dx
@@ -2518,7 +2520,7 @@ load_last:
                mov si,trackbuf
 dir_test_name: cmp byte [si],0         ; Directory high water mark
                je dir_return           ; Failed
-                test byte [si+11],018h ; Check it really is a file
+                test byte [si+11],18h  ; Check it really is a file
                 jnz dir_not_this
                push di
                push si
diff --git a/version b/version
index 6477a57..a4c3d07 100644 (file)
--- a/version
+++ b/version
@@ -1 +1 @@
-1.40
+1.41