From: "Steven J. Magnani" <steve@digidescorp.com>
To: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fat: Refactor shortname parsing
Date: Mon, 02 Jul 2012 10:51:21 -0500 [thread overview]
Message-ID: <1341244281.1695.28.camel@iscandar.digidescorp.com> (raw)
In-Reply-To: <871ukunqp3.fsf@devron.myhome.or.jp>
On Tue, 2012-07-03 at 00:11 +0900, OGAWA Hirofumi wrote:
> "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.
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.
2. Sprinkle "if (!isvfat)" throughout the already-proposed version of
fat_parse_short()
A. Everywhere
B. Only in the places you've proposed
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].
4. Other options?
The NFS changes I would like to post depend on fat_parse_short() in some
form.
Steve
next prev parent reply other threads:[~2012-07-02 15:51 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-29 18:12 Steven J. Magnani
2012-06-29 19:08 ` OGAWA Hirofumi
2012-06-29 19:13 ` Steven J. Magnani
2012-06-29 20:03 ` OGAWA Hirofumi
2012-06-29 20:09 ` OGAWA Hirofumi
2012-07-02 13:01 ` Steven J. Magnani
2012-07-02 13:40 ` OGAWA Hirofumi
2012-07-02 14:00 ` Steven J. Magnani
2012-07-02 14:36 ` OGAWA Hirofumi
2012-07-02 14:45 ` Steven J. Magnani
2012-07-02 15:11 ` OGAWA Hirofumi
2012-07-02 15:51 ` Steven J. Magnani [this message]
2012-07-02 16:59 ` OGAWA Hirofumi
2012-07-03 11:14 Steven J. Magnani
2012-07-03 11:28 ` OGAWA Hirofumi
2012-08-03 14:52 ` Jan Engelhardt
2012-08-03 15:06 ` OGAWA Hirofumi
2012-08-03 15:58 ` Jan Engelhardt
2012-08-03 16:09 ` Steven J. Magnani
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1341244281.1695.28.camel@iscandar.digidescorp.com \
--to=steve@digidescorp.com \
--cc=hirofumi@mail.parknet.co.jp \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®