Bug 823887 - Filenames containing Chinese characters can't be created on vfat filesystems
Filenames containing Chinese characters can't be created on vfat filesystems
Status: CLOSED UPSTREAM
Product: Virtualization Tools
Classification: Community
Component: libguestfs (Show other bugs)
unspecified
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Richard W.M. Jones
: i18n
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-22 07:36 EDT by Richard W.M. Jones
Modified: 2012-05-25 11:43 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-05-25 11:43:05 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Richard W.M. Jones 2012-05-22 07:36:26 EDT
Description of problem:

$ guestfish -N fs:vfat -m /dev/sda1 

Welcome to guestfish, the libguestfs filesystem interactive shell for
editing virtual machine filesystems.

Type: 'help' for help on commands
      'man' to read the manual
      'quit' to quit the shell

><fs> touch /马磊
libguestfs: error: touch: open: /马磊: Invalid argument
><fs> ll /
total 20
drwxr-xr-x  2 root root 16384 Jan  1  1970 .
drwxr-xr-x 23  500  500  4096 May 22 12:35 ..

Version-Release number of selected component (if applicable):

1.18.0

How reproducible:

100%

Steps to Reproduce:
1. See above.
Comment 1 Richard W.M. Jones 2012-05-23 04:56:56 EDT
The bug reporter sent me the disk image which fails
(CA+ePHTDrJHi2z71s5+pZuBWEenBq9oCYuN+VuEhSRiYQFd4C6w@mail.gmail.com)

It is a vfat partition containing files with Chinese
characters.  When mounted without any options, these show
up as "?".  When mounted with the "utf8" mount option,
these show up normally.

><fs> list-filesystems 
/dev/vda: vfat
><fs> mount /dev/vda /
><fs> ll /
total 24
drwxr-xr-x  4 root root 4096 Jan  1  1970 .
drwxr-xr-x 23  500  500 4096 May 23 09:53 ..
-rwxr-xr-x  1 root root    0 Nov 30 08:18 ?? ????.txt
-rwxr-xr-x  1 root root   58 Nov 30 08:18 ?? ????.wav
-rwxr-xr-x  1 root root   22 Nov 30 08:18 ?? WinRAR ZIP ????.zip
drwxr-xr-x  6 root root 4096 Dec 12 10:03 root1
drwxr-xr-x  2 root root 4096 Dec 12 10:03 root2

><fs> umount /
><fs> mount-options "utf8" /dev/vda /
><fs> ll /
total 24
drwxr-xr-x  4 root root 4096 Jan  1  1970 .
drwxr-xr-x 23  500  500 4096 May 23 09:53 ..
drwxr-xr-x  6 root root 4096 Dec 12 10:03 root1
drwxr-xr-x  2 root root 4096 Dec 12 10:03 root2
-rwxr-xr-x  1 root root   22 Nov 30 08:18 新建 WinRAR ZIP 压缩文件.zip
-rwxr-xr-x  1 root root    0 Nov 30 08:18 新建 文本文档.txt
-rwxr-xr-x  1 root root   58 Nov 30 08:18 新建 波形声音.wav
Comment 2 Richard W.M. Jones 2012-05-25 11:42:47 EDT
This is essentially a design problem in the Linux kernel.

I have however pushed a documentation fix and a new test
upstream which should help:

https://github.com/libguestfs/libguestfs/commit/6445bc5952efd47fb1aa0880d9038040551d72ed
https://github.com/libguestfs/libguestfs/commit/8e8a5764293d1b6bc3dbfb9409722e4c13384aec

Note You need to log in before you can comment on or make changes to this bug.