1. 01 Aug, 2009 2 commits
    • OGAWA Hirofumi's avatar
      fat/nls: Fix handling of utf8 invalid char · 67638e40
      OGAWA Hirofumi authored
      With utf8 option, vfat allowed the duplicated filenames.
      
      Normal nls returns -EINVAL for invalid char. But utf8s_to_utf16s()
      skipped the invalid char historically.
      
      So, this changes the utf8s_to_utf16s() directly to return -EINVAL for
      invalid char, because vfat is only user of it.
      
      mkdir /mnt/fatfs
      FILENAME=`echo -ne "invalidutf8char_\\0341_endofchar"`
      echo "Using filename: $FILENAME"
      dd if=/dev/zero of=fatfs bs=512 count=128
      mkdosfs -F 32 fatfs
      mount -o loop,utf8 fatfs /mnt/fatfs
      touch "/mnt/fatfs/$FILENAME"
      umount /mnt/fatfs
      mount -o loop,utf8 fatfs /mnt/fatfs
      touch "/mnt/fatfs/$FILENAME"
      ls -l /mnt/fatfs
      umount /mnt/fatfs
      
      ----  And the output is:
      
      Using filename: invalidutf8char_\0341_endofchar
      128+0 records in
      128+0 records out
      65536 bytes (66 kB) copied, 0.000388118 s, 169 MB/s
      mkdosfs 2.11 (12 Mar 2005)
      total 0
      -rwxr-xr-x 1 root root 0 Jun 28 19:46 invalidutf8char__endofchar
      -rwxr-xr-x 1 root root 0 Jun 28 19:46 invalidutf8char__endofchar
      Tested-by: default avatarMarton Balint <cus@fazekas.hu>
      Signed-off-by: default avatarOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      67638e40
    • Linus Torvalds's avatar
      Linux 2.6.31-rc5 · ed680c4a
      Linus Torvalds authored
      ed680c4a
  2. 31 Jul, 2009 19 commits
  3. 30 Jul, 2009 19 commits