On Sat, Aug 30, 2008 at 8:47 PM, Robert Millan <[EMAIL PROTECTED]> wrote: > On Sat, Aug 30, 2008 at 03:07:21AM +0800, Bean wrote: >> Hi, >> >> This patch allow case insensitive filename in Win32 and DOS namespace. >> Names in POSIX namespace would still be case sensitive. It also remove >> names in the DOS namespace, as they will reappear in Win32 namespace. > > Nice work :-) > >> --- a/fs/fshelp.c >> +++ b/fs/fshelp.c >> @@ -80,7 +80,13 @@ grub_fshelp_find_file (const char *path, >> grub_fshelp_node_t rootnode, >> enum grub_fshelp_filetype filetype, >> grub_fshelp_node_t node) >> { >> - if (type == GRUB_FSHELP_UNKNOWN || grub_strcmp (name, filename)) >> + int case_insensitive = (filetype & GRUB_FSHELP_CASE_INSENSITIVE); >> + >> + filetype &= ~GRUB_FSHELP_CASE_INSENSITIVE; >> + if (filetype == GRUB_FSHELP_UNKNOWN || >> + (grub_strcmp (name, filename) && >> + (! case_insensitive || >> + grub_strncasecmp (name, filename, LONG_MAX)))) > > Since `case_insensitive' is only used once, maybe we could skip this > variable?
Committed. -- Bean _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel