* [PATCH] vfat write wrong value into lcase flag @ 2001-08-08 15:30 OGAWA Hirofumi 2001-08-08 20:14 ` Nerijus Baliunas 0 siblings, 1 reply; 5+ messages in thread From: OGAWA Hirofumi @ 2001-08-08 15:30 UTC (permalink / raw) To: Linus Torvalds; +Cc: linux-kernel Hi, The current vfat is writeing wrong value into lcase flag. It is writing the lowercase flag, although filename is uppercase. Please apply. -- OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> diff -urN linux-2.4.8-pre6/fs/vfat/namei.c vfat_lcase-2.4.8-pre6/fs/vfat/namei.c --- linux-2.4.8-pre6/fs/vfat/namei.c Sat Apr 7 02:51:19 2001 +++ vfat_lcase-2.4.8-pre6/fs/vfat/namei.c Thu Aug 9 00:07:39 2001 @@ -1056,7 +1056,7 @@ (*de)->starthi = 0; (*de)->size = 0; (*de)->attr = is_dir ? ATTR_DIR : ATTR_ARCH; - (*de)->lcase = CASE_LOWER_BASE | CASE_LOWER_EXT; + (*de)->lcase = 0; fat_mark_buffer_dirty(sb, *bh); ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] vfat write wrong value into lcase flag 2001-08-08 15:30 [PATCH] vfat write wrong value into lcase flag OGAWA Hirofumi @ 2001-08-08 20:14 ` Nerijus Baliunas 2001-08-09 18:16 ` OGAWA Hirofumi 0 siblings, 1 reply; 5+ messages in thread From: Nerijus Baliunas @ 2001-08-08 20:14 UTC (permalink / raw) To: OGAWA Hirofumi, linux-kernel On 09 Aug 2001 00:30:58 +0900 OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> wrote: OH> The current vfat is writeing wrong value into lcase flag. It is OH> writing the lowercase flag, although filename is uppercase. Hello, In December 1999 I sent my investigation about short filenames in vfat: _________________________________________ Hello, there were some complaints about linux not handling upper/lowercase filenames in vfat correctly (they are below). So I did some investigation. I created following directories (or files, it does not matter): in Linux: LINUP, linlow in win98: 98UP, 98low in NT4: NTUP, ntlow in W2k: W2KUP, w2klow Now what ls/dir shows: in Linux: LINUP, linlow, 98up, 98low, ntup, ntlow, w2kup, w2klow in win98: LINUP, LINLOW, 98UP, 98low, NTUP, NTLOW, W2KUP, W2KLOW in NT4: LINUP, linlow, 98UP, 98low, NTUP, ntlow, W2KUP, w2klow in W2K: LINUP, linlow, 98UP, 98low, NTUP, ntlow, W2KUP, w2klow So I would suggest NT/W2K shows everything correctly (if we can call so, because microsoft mixed everything up), and win98/Linux shows differently in opposite directions. I think Linux should follow one of win95/98 or NT/W2K, and since NT/W2K seams more reasonable, Linux could display filenames like NT (Linux creates filenames similar to NT already). There is no such problem with mixed up/low or with filenames containing more than 8 characters. _________________________________________ I like this table format better, with errors marked: in Linux: LINUP linlow <98up> 98low <ntup> ntlow in win98: LINUP <LINLOW> 98UP 98low NTUP <NTLOW> in NT4: LINUP linlow 98UP 98low NTUP ntlow Clearly NT displays everything right. Lowercase must be written the Win98 way. Uppercase must be written the Linux way. _________________________________________ Then I sent a diskette image to Al Viro: > I am sending diskette image, made with > dd if=/dev/fd0 of=fdd_vfat bs=512 count=2847 Aha... In other words, for NT in short records bit 3 at offset 0xc means 'lowercase it'. 9x ignores the thing. Everybody handle the long entries the same way. Umhm... Thanks. _________________________________________ I think Linux should create files like win98 (because NT shows them correctly) and show like NT. Regards, Nerijus ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] vfat write wrong value into lcase flag 2001-08-08 20:14 ` Nerijus Baliunas @ 2001-08-09 18:16 ` OGAWA Hirofumi 2001-08-10 14:09 ` Re[2]: " Nerijus Baliunas 0 siblings, 1 reply; 5+ messages in thread From: OGAWA Hirofumi @ 2001-08-09 18:16 UTC (permalink / raw) To: Nerijus Baliunas; +Cc: linux-kernel Nerijus Baliunas <nerijus@users.sourceforge.net> writes: > On 09 Aug 2001 00:30:58 +0900 OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> wrote: > > OH> The current vfat is writeing wrong value into lcase flag. It is > OH> writing the lowercase flag, although filename is uppercase. > > Hello, > > In December 1999 I sent my investigation about short filenames in vfat: [...] > > I think Linux should create files like win98 > (because NT shows them correctly) and show like NT. The _current vfat_ uses the following rule. name attribute used direntry ----------------------------------------------------------------------------- foo.txt LONG_FILENAME, CASE_LOWER_BASE | CASE_LOWER_EXT 2 foo.TXT LONG_FILENAME, CASE_LOWER_BASE | CASE_LOWER_EXT 2 FOO.txt LONG_FILENAME, CASE_LOWER_BASE | CASE_LOWER_EXT 2 FOO.TXT , CASE_LOWER_BASE | CASE_LOWER_EXT 1 Foo.TXT LONG_FILENAME, CASE_LOWER_BASE | CASE_LOWER_EXT 2 FOO.Txt LONG_FILENAME, CASE_LOWER_BASE | CASE_LOWER_EXT 2 I missed something? -- OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re[2]: [PATCH] vfat write wrong value into lcase flag 2001-08-09 18:16 ` OGAWA Hirofumi @ 2001-08-10 14:09 ` Nerijus Baliunas 2001-08-10 16:56 ` OGAWA Hirofumi 0 siblings, 1 reply; 5+ messages in thread From: Nerijus Baliunas @ 2001-08-10 14:09 UTC (permalink / raw) To: OGAWA Hirofumi, linux-kernel [-- Attachment #1: Type: TEXT/PLAIN, Size: 1586 bytes --] On 10 Aug 2001 03:16:34 +0900 OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> wrote: OH> Nerijus Baliunas <nerijus@users.sourceforge.net> writes: OH> OH> > On 09 Aug 2001 00:30:58 +0900 OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> wrote: OH> > OH> > OH> The current vfat is writeing wrong value into lcase flag. It is OH> > OH> writing the lowercase flag, although filename is uppercase. OH> > OH> > Hello, OH> > OH> > In December 1999 I sent my investigation about short filenames in vfat: OH> OH> [...] OH> OH> > I think Linux should create files like win98 OH> > (because NT shows them correctly) and show like NT. OH> OH> The _current vfat_ uses the following rule. OH> OH> name attribute used direntry OH> ----------------------------------------------------------------------------- OH> foo.txt LONG_FILENAME, CASE_LOWER_BASE | CASE_LOWER_EXT 2 OH> foo.TXT LONG_FILENAME, CASE_LOWER_BASE | CASE_LOWER_EXT 2 OH> FOO.txt LONG_FILENAME, CASE_LOWER_BASE | CASE_LOWER_EXT 2 OH> FOO.TXT , CASE_LOWER_BASE | CASE_LOWER_EXT 1 OH> Foo.TXT LONG_FILENAME, CASE_LOWER_BASE | CASE_LOWER_EXT 2 OH> FOO.Txt LONG_FILENAME, CASE_LOWER_BASE | CASE_LOWER_EXT 2 OH> OH> I missed something? I don't know. Sorry, I didn't look at the code, but current (2.4.7) kernel still shows filenames as I wrote in 1999. I am talking about filenames _without_ long entries. Didn't test what current kernel writes, though. I'm attaching floppy image, ungzip and loop mount it. Regards, Nerijus [-- Attachment #2: fdd_vfat.gz --] [-- Type: APPLICATION/X-GZIP, Size: 1961 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] vfat write wrong value into lcase flag 2001-08-10 14:09 ` Re[2]: " Nerijus Baliunas @ 2001-08-10 16:56 ` OGAWA Hirofumi 0 siblings, 0 replies; 5+ messages in thread From: OGAWA Hirofumi @ 2001-08-10 16:56 UTC (permalink / raw) To: Nerijus Baliunas; +Cc: linux-kernel [-- Attachment #1: Type: text/plain, Size: 2161 bytes --] Nerijus Baliunas <nerijus@users.sourceforge.net> writes: > I don't know. Sorry, I didn't look at the code, but current (2.4.7) kernel still shows > filenames as I wrote in 1999. I am talking about filenames _without_ long entries. > Didn't test what current kernel writes, though. > I'm attaching floppy image, ungzip and loop mount it. Thanks for sending floppy image. This floppy image contains following directory entry: (this floppy image forgot testing extension name) name attribute used direntry ----------------------------------------------------------------------------- LINUP LONG_FILENAME, CASE_LOWER_BASE | CASE_LOWER_EXT 2 LINLOW , CASE_LOWER_BASE | CASE_LOWER_EXT 1 DOSUP , 1 DOSLOW , 1 98UP , 1 98low LONG_FILENAME, 2 W2KUP , 1 W2KLOW , CASE_LOWER_BASE 1 NTUP , 1 NTLOW , CASE_LOWER_BASE 1 linux-2.4.8-pre8: ----------------------------------------------------------------------------- LINUP , CASE_LOWER_BASE | CASE_LOWER_EXT 1 linlow LONG_FILENAME, CASE_LOWER_BASE | CASE_LOWER_EXT 2 default, convert the shortname to lowercase: $ mount -t vfat fdd_vfat /mnt -o loop $ ls /mnt 98low 98up LINUP doslow dosup linlow ntlow ntup w2klow w2kup nocase option, use the win9x rule for display (doesn't support CASE_* flags): $ mount -t vfat fdd_vfat /mnt -o loop,nocase $ ls /mnt 98UP 98low DOSLOW DOSUP LINLOW LINUP NTLOW NTUP W2KLOW W2KUP 2.4.8-pre8 is useing the win9x rule for create. But attribute must change to 0. Now, I writing the lower/win95/winnt/mixed rule on -ac tree. Please help to test the following patch, if you interests. -- OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> [-- Attachment #2: vfat_shortname-2.4.7-ac10.diff.gz --] [-- Type: application/octet-stream, Size: 6655 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2001-08-10 16:57 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2001-08-08 15:30 [PATCH] vfat write wrong value into lcase flag OGAWA Hirofumi 2001-08-08 20:14 ` Nerijus Baliunas 2001-08-09 18:16 ` OGAWA Hirofumi 2001-08-10 14:09 ` Re[2]: " Nerijus Baliunas 2001-08-10 16:56 ` OGAWA Hirofumi
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox