From: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
To: Jan Engelhardt <jengelh@inai.de>
Cc: "Steven J. Magnani" <steve@digidescorp.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fat: Refactor shortname parsing
Date: Sat, 04 Aug 2012 00:06:27 +0900 [thread overview]
Message-ID: <87lihw10cs.fsf@devron.myhome.or.jp> (raw)
In-Reply-To: <alpine.LNX.2.01.1208031650580.3676@frira.zrqbmnf.qr> (Jan Engelhardt's message of "Fri, 3 Aug 2012 16:52:03 +0200 (CEST)")
Jan Engelhardt <jengelh@inai.de> writes:
> On Tuesday 2012-07-03 13:14, Steven J. Magnani wrote:
>
>>Nearly identical shortname parsing is performed in fat_search_long()
>>and __fat_readdir(). Extract this code into a function that may be
>>called by both.
>>
>>v2: Attempt to clarify difference between vfat and msdos parsing.
>> Remove decision-making from fat_tolower() for clarity.
>>
>>Signed-off-by: Steven J. Magnani <steve@digidescorp.com>
>>---
>>diff -uprN linux-3.5-rc4/fs/fat/dir.c new/fs/fat/dir.c
>>--- linux-3.5-rc4/fs/fat/dir.c 2012-06-29 11:20:12.766348728 -0500
>>+++ new/fs/fat/dir.c 2012-07-03 06:10:36.066283411 -0500
>>@@ -35,6 +35,11 @@
>> #define FAT_MAX_UNI_CHARS ((MSDOS_SLOTS - 1) * 13 + 1)
>> #define FAT_MAX_UNI_SIZE (FAT_MAX_UNI_CHARS * sizeof(wchar_t))
>>
>>+static inline unsigned char fat_tolower(unsigned char c)
>>+{
>>+ return ((c >= 'A') && (c <= 'Z')) ? c+32 : c;
>>+}
>>+
>
> The kernel already has a tolower() function, can that not be used?
tolower() is not exactly same, right? e.g. tolower(0xc0). Otherwise,
tolower() is fine.
--
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
next prev parent reply other threads:[~2012-08-03 15:06 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-03 11:14 [PATCH] fat: Refactor shortname parsing Steven J. Magnani
2012-07-03 11:28 ` OGAWA Hirofumi
2012-08-03 14:52 ` Jan Engelhardt
2012-08-03 15:06 ` OGAWA Hirofumi [this message]
2012-08-03 15:58 ` Jan Engelhardt
2012-08-03 16:09 ` Steven J. Magnani
-- strict thread matches above, loose matches on Subject: below --
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
2012-07-02 16:59 ` OGAWA Hirofumi
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=87lihw10cs.fsf@devron.myhome.or.jp \
--to=hirofumi@mail.parknet.co.jp \
--cc=jengelh@inai.de \
--cc=linux-kernel@vger.kernel.org \
--cc=steve@digidescorp.com \
/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