Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Sep 2002 18:30:04 -0700 (PDT)
From:      Giorgos Keramidas <keramida@FreeBSD.org>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: misc/43543: cdboot does not handle 'relaxed' ISO9660 discs
Message-ID:  <200210010130.g911U4jh080990@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR misc/43543; it has been noted by GNATS.

From: Giorgos Keramidas <keramida@FreeBSD.org>
To: Tim Kientzle <kientzle@acm.org>
Cc: bug-followup@FreeBSD.org
Subject: Re: misc/43543: cdboot does not handle 'relaxed' ISO9660 discs
Date: Tue, 1 Oct 2002 04:26:58 +0300

 On 2002-09-30 15:21, Tim Kientzle <kientzle@acm.org> wrote:
 > Alter 'cdboot' to try both filenames.
 > The following patch accomplishes this.
 
 Nice idea.  But will this work for "/Boot/Loader" too?
 Is it possible to look for the name in any capitalisation?
 
 Perhaps by changing the bit in find_file that compares the filenames
 to ignore differences in lowercase and uppercase letters?  I haven't
 looked in x86 asm for a while, but how about something like this?
 
 * Note: This grows the size of the code a lot, and I haven't checked
 to see if it actually works, as I am in the middle of a long running
 buildworld.  It's just an idea.
 
 %%%
 Index: cdboot.s
 ===================================================================
 RCS file: /home/ncvs/src/sys/boot/i386/cdboot/cdboot.s,v
 retrieving revision 1.9
 diff -u -r1.9 cdboot.s
 --- cdboot.s	7 Nov 2001 01:20:33 -0000	1.9
 +++ cdboot.s	1 Oct 2002 01:25:09 -0000
 @@ -365,9 +365,22 @@
  		ret				# End of file, so not found
  ff.checkname:	lea DIR_NAME(%bx),%di		# Address name in record
  		push %si			# Save
 -		repe cmpsb			# Compare name
 +ff.cmpname:	push %ax
 +		lodsb				# fetch name char
 +		dec %di
 +		cmp $65,%al			# less than 'A' ?
 +		jb ff.lcase
 +		cmp $90,%al			# above 'Z' ?
 +		ja ff.lcase
 +		add $32,%al			# convert to lowercase
 +		stosb				# store back in name
 +		dec %di
 +ff.lcase:	pop %ax
 +		cmpsb				# Compare lowercase char.
 +		jnz ff.out			# Not a match.
 +		loop ff.cmpname			# Keep looking in name.
  		jcxz ff.match			# We have a winner!
 -		pop %si				# Restore
 +ff.out:		pop %si				# Restore
  		jmp ff.nextrec			# Keep looking.
  ff.match:	add $2,%sp			# Discard saved %si
  		clc				# Clear carry
 %%%

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200210010130.g911U4jh080990>