lkml.org 
[lkml]   [2004]   [May]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectvfat case corruption with utf8

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<--------
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 14:03    [W:0.685 / U:0.196 seconds]
©2003-2014 Jasper Spaans. hosted at Digital Ocean