grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Case insensitive filename for NTFS


From: Bean
Subject: Re: [PATCH] Case insensitive filename for NTFS
Date: Fri, 5 Sep 2008 23:49:16 +0800

On Sat, Aug 30, 2008 at 8:47 PM, Robert Millan <address@hidden> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]