lkml.org 
[lkml]   [2018]   [Jan]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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@foxmail.com> writes:
>
> > On 01/29/2018 09:02 PM, OGAWA Hirofumi wrote:
> >> ChenGuanqiao <chen.chenchacha@foxmail.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@gmail.com

\
 
 \ /
  Last update: 2018-01-30 12:32    [W:1.036 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site