DOSFS and the short and Long file names.
Nasir, Aliasgar ( SBU-ETS )
aliasgar.nasir at igatepatni.com
Fri Aug 5 01:10:15 CDT 2011
I did not fully understand your below statement.
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.
Do you mean that if the file name is mixed case, then we should first verify if it satisfies the 8.3 criteria. If it meets the 8.3 criteria, then we should not call the below function at line 1429: msdos_short_name_hex(MSDOS_DIR_NAME(name_dir_entry), slot);
Meaning, if the file name is say New.txt (which is a mix of both cases and also satisfies the 8.3 criteria), then the above function should not be called. Am I right?
From: Chris Johns [mailto:chrisj at rtems.org]
Sent: Friday, August 05, 2011 6:10 AM
To: Nasir, Aliasgar ( SBU-ETS )
Cc: rtems-users at rtems.org
Subject: Re: DOSFS and the short and Long file names.
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.
Information contained and transmitted by this e-mail is confidential and proprietary to iGATE Patni and its affiliates and is intended for use only by the recipient. If you are not the intended recipient, you are hereby notified that any dissemination, distribution, copying or use of this e-mail is strictly prohibited and you are requested to delete this e-mail immediately and notify the originator or mailadmin at igatepatni.com. iGATE Patni does not enter into any agreement with any party by e-mail. Any views expressed by an individual do not necessarily reflect the view of iGATE Patni. iGATE Patni is not responsible for the consequences of any actions taken on the basis of information provided, through this email. The contents of an attachment to this e-mail may contain software viruses, which could damage your own computer system. While iGATE Patni has taken every reasonable precaution to minimise this risk, we cannot accept liability for any damage which you sustain as a result of software viruses. You should carry out your own virus checks before opening an attachment. To know more about iGATE Patni please visit www.igatepatni.com.
More information about the rtems-users