[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20180130113208.glmvabsx54yth5dl@pali>
Date:   Tue, 30 Jan 2018 12:32:08 +0100
From:   Pali Rohár <pali.rohar@...il.com>
To:     OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>
Cc:     chenchacha <chen.chenchacha@...mail.com>,
        linux-kernel@...r.kernel.org,
        Andy Shevchenko <andy.shevchenko@...il.com>
Subject: Re: [PATCH 3/3] fs: fat: add ioctl method in fat filesystem driver
On Tuesday 30 January 2018 20:23:03 OGAWA Hirofumi wrote:
> chenchacha <chen.chenchacha@...mail.com> writes:
> 
> > On 01/29/2018 09:02 PM, OGAWA Hirofumi wrote:
> >> ChenGuanqiao <chen.chenchacha@...mail.com> writes:
> >>
> >>> +static int fat_check_d_characters(char *label, unsigned long len)
> >>> +{
> >>> +	int i;
> >>> +
> >>> +	for (i = 0; i < len; ++i) {
> >>> +		switch (label[i]) {
> >>> +		case 'a' ... 'z':
> >>> +			label[i] = __toupper(label[i]);
> >>> +		case 'A' ... 'Z':
> >>> +		case '0' ... '9':
> >>> +		case '_':
> >>> +		case 0x20:
> >>> +			continue;
> >>> +		default:
> >>> +			return -EINVAL;
> >>> +		}
> >> Same question with previous though, what windows do if label = "a b c"?
> >> (this is including space other than end of name or extension.)
> > In win7, the volume label will be capitalized, and leaving spaces.
> > Or, you mean I need to fill the rest of the space with "0x20"?
> 
> I see. However, what win7 stored, BTW? It was "A B C      ", or anything
> other?
Yes, as in FAT, all directory entries are padded by spaces.
-- 
Pali Rohár
pali.rohar@...il.com
Powered by blists - more mailing lists