Re: [PATCH] fat: Refactor shortname parsing

From: OGAWA Hirofumi
Date: Mon Jul 02 2012 - 12:59:03 EST


"Steven J. Magnani" <steve@xxxxxxxxxxxxxxx> writes:

>> 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.
>
> It's not clear to me where you want to go with this.
>
> 1. Split fat_parse_short() into msdos and vfat versions. This may
> improve clarity, but there would be some replication of code.

This is not a option. We are better to not change.

> 2. Sprinkle "if (!isvfat)" throughout the already-proposed version of
> fat_parse_short()
> A. Everywhere
> B. Only in the places you've proposed

I'm not sure what (A) means though. Probably, I will not care.

> 3. Retain the already-proposed version of fat_parse_short(), but add a
> comment that the uni_name overrides the msdos "ptname", and separate out
> the decision to lowercase from fat_tolower() [i.e., the trigraph].

The trigraph change doesn't cleanup anything. Because it is using
needless ptname on vfat path.

vfat always uses the uni_name and doesn't use ptname, right? And msdos
path doesn't use the uni_name and use ptname always. So, I'm saying,
let's make clear those difference and usage, by annotating with isvfat.
--
OGAWA Hirofumi <hirofumi@xxxxxxxxxxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/