lkml.org 
[lkml]   [2012]   [Jul]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] fat: Refactor shortname parsing
Date
"Steven J. Magnani" <steve@digidescorp.com> writes:

> On Mon, 2012-07-02 at 23:36 +0900, OGAWA Hirofumi wrote:
>> "Steven J. Magnani" <steve@digidescorp.com> writes:
>>
>> > True, but with the change you suggest we lose the incrementing of 'i',
>> > which likely would cause an infinite loop for 1:1 Unicode conversions.
>>
>> You meant, we just have to do
>>
>> if (!is_vfat)
>> ptname[i] = ...;
>> i++;
>>
>> or something? I still feel this looks better to indicate, we don't use
>> ptname in the case of vfat.
>
> I can change it, but there are other places in that function where
> ptname is used that are not qualified with !is_vfat, so I don't know
> whether this improves clarity or reduces it.
>
> I do think fat_tolower() should not be making decisions. IMHO the
> trigraph and a comment, perhaps before the vfat-only reassignment of
> 'name', would be clearer.

Hm, the primary case is vfat. fat_tolower()/hidden is required only for
msdos, and ptname too. So, my suggestion is trying to keep vfat case
clean.
--
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>


\
 
 \ /
  Last update: 2012-07-02 18:01    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site