[syslinux:pathbased] eltorito: Include drive 0xFF in scan

syslinux-bot for Shao Miller shao.miller at yrdsb.edu.on.ca
Sat Jun 19 19:12:02 PDT 2010


Commit-ID:  62ac3a7710b846c66a190156a11b7170015e7afb
Gitweb:     http://syslinux.zytor.com/commit/62ac3a7710b846c66a190156a11b7170015e7afb
Author:     Shao Miller <shao.miller at yrdsb.edu.on.ca>
AuthorDate: Mon, 14 Jun 2010 18:50:56 -0400
Committer:  Shao Miller <shao.miller at yrdsb.edu.on.ca>
CommitDate: Tue, 15 Jun 2010 00:48:34 -0400

eltorito: Include drive 0xFF in scan

Although drive 0xFF could yield a false positive as the El Torito
booted-from drive number, some users of GRUB4DOS actually use
this drive number, so we should include it in our scan.

Signed-off-by: Shao Miller <shao.miller at yrdsb.edu.on.ca>


---
 dosutil/eltorito.asm |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/dosutil/eltorito.asm b/dosutil/eltorito.asm
index 96cfd9b..d6b6b50 100644
--- a/dosutil/eltorito.asm
+++ b/dosutil/eltorito.asm
@@ -1029,9 +1029,11 @@ SpecGo:		mov	si,SpecPkt
 
 ScanDrives:	push	ax		; at df3 in 1.4
 		push	si
-		mov dl, 80h		;Start at Drive 0x80
-NextDrv:	mov	ax,4B01h		;Get Bootable CD-ROM Status
-		mov	BYTE [SpecPkt],0		;Clear 1st byte of SpecPkt
+		mov dl, 7fh		;Start at Drive 0x80
+NextDrv:	inc	dl
+		clc
+		mov	ax,4B01h	;Get Bootable CD-ROM Status
+		mov	BYTE [SpecPkt],0	;Clear 1st byte of SpecPkt
 		call	SpecGo
 ; Carry is not cleared in buggy Dell BIOSes,
 ; so I'm checking packet size byte
@@ -1044,10 +1046,9 @@ NextDrv:	mov	ax,4B01h		;Get Bootable CD-ROM Status
 		ja	FindFail	; in 1.4 at e16
 		jmp	short SendFound	; in 1.4 at e26
 
-FindFail:	inc	dl			;Next drive
-		cmp	dl, 0ffh
-		jb	SendFail		; Check from 80h..ffh
-		jmp	short NextDrv
+FindFail:	cmp	dl, 0ffh
+		je	SendFail		; Check from 80h..ffh
+		jmp	short NextDrv		;Next drive
 SendFail:	xor	dl,dl
 		stc
 		jmp	short ThingDone



More information about the Syslinux-commits mailing list