From owner-freebsd-bugs Mon Sep 30 18:30: 6 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C069037B401 for ; Mon, 30 Sep 2002 18:30:04 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7A95443E42 for ; Mon, 30 Sep 2002 18:30:04 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id g911U4Co080991 for ; Mon, 30 Sep 2002 18:30:04 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id g911U4jh080990; Mon, 30 Sep 2002 18:30:04 -0700 (PDT) Date: Mon, 30 Sep 2002 18:30:04 -0700 (PDT) Message-Id: <200210010130.g911U4jh080990@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Giorgos Keramidas Subject: Re: misc/43543: cdboot does not handle 'relaxed' ISO9660 discs Reply-To: Giorgos Keramidas Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR misc/43543; it has been noted by GNATS. From: Giorgos Keramidas To: Tim Kientzle 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 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