lkml.org 
[lkml]   [2012]   [Jul]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] fat: Refactor shortname parsing
From
Date
On Sat, 2012-06-30 at 05:09 +0900, OGAWA Hirofumi wrote: 
> OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> writes:
>
> >
> > if (is_vfat)
> > ptname[i++] = fat_tolower(!nocase, c);
>
> Of course, if (!is_vfat). Sorry.

I agree that the nocase logic is confusing, but I'm pretty sure this
change would break the code.

'nocase' is always zero for vfat, which does not recognize that option.
For msdos, it is zero by default, and 1 if the 'nocase' option was
specified.
In all cases it is necessary to copy *something* to ptname.

What could be done is something like this:

if (nocase)
ptname[i++] = c;
else
ptname[i++] = fat_tolower(c);

or, if you don't mind trigraphs:
ptname[i++] = nocase ? c : fat_tolower(c);

Let me know what you prefer.

Thanks,
Steve




\
 
 \ /
  Last update: 2012-07-02 16:21    [W:0.056 / U:1.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site