DOSFS and the short and Long file names.

Chris Johns chrisj at rtems.org
Fri Aug 5 00:39:57 UTC 2011


On 4/08/11 8:15 PM, Nasir, Aliasgar ( SBU-ETS ) wrote:
> Hi Chris,
>
> Thanks for the reply.
>
> If the file name has only lower case letters, then the name in not distorted on Windows. However, on the Windows, the file name shows all characters as upper case.
>

This is how short file names are recorded in the directory table with 
DOSFS. For RTEMS I made the file names lower case. They had to be 
something. I always a mount option could be added if this was an issue 
to turn the lower case mode off.

> If the file name has just upper case letter, the name appears distorted on Windows. Is this desired behavior?

I suspect not. I wonder if in this case a long entry is made with the 
mixed case and the short name has the file name in upper case. Just 
checked with a FAT disk on Windows XP and this is the case:

H:\>dir /x /n
  Volume in drive H has no label.
  Volume Serial Number is 5790-9778

  Directory of H:\

05/08/2011  10:14 AM                 4 UPPER.TXT    Upper.txt
                1 File(s)              4 bytes
                0 Dir(s)     100,130,816 bytes free

>
> If the file name has only upper case and a numeral (0 - 9), then the name is again seen distorted on Windows.
>
> But still I am not able to figure out why mixed case file names are seen distorted in Windows. Do you have any idea? Or is there any solution to this problem?
>

This is the RTEMS implementation and it should change. The ares of code 
is 'cpukit/libfs/src/dosfs/msdos_misc.c' about line 1429. If you add a 
test of the long file being made suitable short file name characters and 
8.3 then you could copy the long file name with an uppercase convert to 
the short file name.

> Or as a rule we have to ensure that we make files names with only lower case when working with DOSFS with RTEMS4.10. Is this true? Otherwise we end up seeing distorted names on Windows.

I suppose so until the behavior is changed.

> Information contained and transmitted by ..... <removed>

Last post I respond to with this signature appended. Please read the 
policies and use a web based email account you cannot control the signature.

Chris



More information about the users mailing list