LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* vfat case corruption with utf8
@ 2004-05-26 22:01 Len Trigg
0 siblings, 0 replies; only message in thread
From: Len Trigg @ 2004-05-26 22:01 UTC (permalink / raw)
To: linux-kernel, Roman.Hodek
Hi,
When I mount a vfat filesystem and create files, the case of the files
changes after creation. I am using Fedora FC2 with kernel 2.6.5. I
have created a script that demonstrates the problem (see below).
I originally filed a bug with fedora about it, and it turns out that
the problem occurs on systems that default to utf8. There is a FIXME
comment in fs/fat/inode.c:1025. Mounting with iocharset=iso8859-1
works around the problem, but given that more systems seem to be going
to utf8, this is something that more people will be banging up
against.
Cheers,
Len.
-------8<--------
#!/bin/sh
# Make a test vfat filesystem
dd if=/dev/zero of=vfatfile bs=1M count=100
mkfs.vfat -F 32 -n "test" vfatfile
mkdir vfatmount
mount -o loop vfatfile vfatmount
# Make a directory called F00 and a test file
mkdir vfatmount/F00
touch vfatmount/F00/test
# Check test file is accessible (it should be)
if [ -f vfatmount/F00/test ]; then
echo "Test file is visible"
else
echo "ERROR: test file is not visible"
fi
# This action changes the naming of the directory!!
ls -l vfatmount/
# Check test file again (this time it fails)
if [ -f vfatmount/F00/test ]; then
echo "Test file is visible"
else
echo "ERROR: test file is not visible"
fi
# Cleanup
umount vfatfile
rm -r vfatfile vfatmount
-------8<--------
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-05-26 22:02 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-26 22:01 vfat case corruption with utf8 Len Trigg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).