Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1JK5hc-0006gn-UG for mharc-grub-devel@gnu.org; Wed, 30 Jan 2008 00:41:40 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JK5ha-0006f0-CC for grub-devel@gnu.org; Wed, 30 Jan 2008 00:41:38 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JK5hZ-0006ea-Fk for grub-devel@gnu.org; Wed, 30 Jan 2008 00:41:37 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JK5hY-0006eP-Hi for grub-devel@gnu.org; Wed, 30 Jan 2008 00:41:37 -0500 Received: from smtp6-g19.free.fr ([212.27.42.36]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JK5hY-0008R8-5M for grub-devel@gnu.org; Wed, 30 Jan 2008 00:41:36 -0500 Received: from smtp6-g19.free.fr (localhost.localdomain [127.0.0.1]) by smtp6-g19.free.fr (Postfix) with ESMTP id 8685E5FDD3; Wed, 30 Jan 2008 06:41:35 +0100 (CET) Received: from saphi (boi78-1-82-232-198-173.fbx.proxad.net [82.232.198.173]) by smtp6-g19.free.fr (Postfix) with ESMTP id 5C4D45FD2A; Wed, 30 Jan 2008 06:41:35 +0100 (CET) Received: from gingold by saphi with local (Exim 3.36 #1 (Debian)) id 1JK5oZ-0001DV-00; Wed, 30 Jan 2008 06:48:51 +0100 Date: Wed, 30 Jan 2008 06:48:51 +0100 To: Marco Gerards Message-ID: <20080130054851.GB4665@saphi> References: <20080128160905.GA2739@saphi> <20080128165504.GB9715@thorin> <20080129051252.GA2504@saphi> <20080129095922.GA31756@thorin> <1201602926.479f016e27f08@imp.free.fr> <20080129113219.GA22894@thorin> <1201611409.479f22918bed6@imp.free.fr> <20080129131934.GB26291@thorin> <871w80adut.fsf@xs4all.nl> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="aVD9QWMuhilNxW9f" Content-Disposition: inline In-Reply-To: <871w80adut.fsf@xs4all.nl> User-Agent: Mutt/1.5.9i From: Tristan Gingold X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) Cc: tgingold@free.fr, The development of GRUB 2 Subject: Re: IA64 port X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jan 2008 05:41:38 -0000 --aVD9QWMuhilNxW9f Content-Type: text/plain; charset=us-ascii Content-Disposition: inline > If you send in a new patch that addresses Robert's concerns + > Changelog entry, I will go over it ASAP :-). Giving the same comments > as Robert does seems like a waste of time for everyone. Is this ok > for you? Here is the patch that makes FAT fs case insensitive. Tristan. --aVD9QWMuhilNxW9f Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="grub-fat.diffs" 2008-01-28 Tristan Gingold * kern/misc.c (grub_strcasecmp): New function. * include/grub/misc.h: Declare grub_strcasecmp. * fs/fat.c (grub_fat_find_dir): Use case insensitive string compare as filenames are not case sensitive. diff -ruNp -x '*~' -x CVS -x autom4te.cache -x '*.mk' -x configure grub2.orig/kern/misc.c grub2/kern/misc.c --- grub2.orig/kern/misc.c 2008-01-15 18:22:09.000000000 +0100 +++ grub2/kern/misc.c 2008-01-28 16:29:58.000000000 +0100 @@ -193,6 +193,26 @@ grub_strcmp (const char *s1, const char } int +grub_strcasecmp (const char *s1, const char *s2) +{ + char c1, c2; + + while (*s1 && *s2) + { + c1 = grub_tolower (*s1); + c2 = grub_tolower (*s2); + if (c1 != c2) + return (int) c1 - (int) c2; + + s1++; + s2++; + } + + /* One of these is 0! */ + return (int) *s1 - (int) *s2; +} + +int grub_strncmp (const char *s1, const char *s2, grub_size_t n) { if (n == 0) diff -ruNp -x '*~' -x CVS -x autom4te.cache -x '*.mk' -x configure grub2.orig/include/grub/misc.h grub2/include/grub/misc.h --- grub2.orig/include/grub/misc.h 2007-11-05 15:54:00.000000000 +0100 +++ grub2/include/grub/misc.h 2008-01-28 16:29:57.000000000 +0100 @@ -46,6 +46,7 @@ int EXPORT_FUNC(grub_memcmp) (const void int EXPORT_FUNC(grub_strcmp) (const char *s1, const char *s2); int EXPORT_FUNC(grub_strncmp) (const char *s1, const char *s2, grub_size_t n); int EXPORT_FUNC(grub_strncasecmp) (const char *s1, const char *s2, int c); +int EXPORT_FUNC(grub_strcasecmp) (const char *s1, const char *s2); char *EXPORT_FUNC(grub_strchr) (const char *s, int c); char *EXPORT_FUNC(grub_strrchr) (const char *s, int c); int EXPORT_FUNC(grub_strword) (const char *s, const char *w); diff -ruNp -x '*~' -x CVS -x autom4te.cache -x '*.mk' -x configure grub2.orig/fs/fat.c grub2/fs/fat.c --- grub2.orig/fs/fat.c 2007-08-02 20:40:36.000000000 +0200 +++ grub2/fs/fat.c 2008-01-28 16:29:57.000000000 +0100 @@ -568,7 +568,7 @@ grub_fat_find_dir (grub_disk_t disk, str continue; } - if (grub_strcmp (dirname, filename) == 0) + if (grub_strcasecmp (dirname, filename) == 0) { if (call_hook) hook (filename, dir.attr & GRUB_FAT_ATTR_DIRECTORY); @@ -601,7 +601,7 @@ grub_fat_find_dir (grub_disk_t disk, str if (hook (filename, dir.attr & GRUB_FAT_ATTR_DIRECTORY)) break; } - else if (grub_strcmp (dirname, filename) == 0) + else if (grub_strcasecmp (dirname, filename) == 0) { if (call_hook) hook (filename, dir.attr & GRUB_FAT_ATTR_DIRECTORY); --aVD9QWMuhilNxW9f--