DOSFS and the short and Long file names.

Nasir, Aliasgar ( SBU-ETS ) aliasgar.nasir at igatepatni.com
Thu Aug 4 10:15:09 UTC 2011


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.

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

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?

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.

Regards,
Ali

-----Original Message-----
From: Chris Johns [mailto:chrisj at rtems.org]
Sent: Thursday, August 04, 2011 10:05 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 1:59 PM, Nasir, Aliasgar ( SBU-ETS ) wrote:
> Hi,
>
> With the RTEMS4.10, we noticed that there is concept about long and
> short file names in the DOSFS.
>
> We use the DOSFS on an SDCARD. When we try to write a file on the card,
> with file name say 'Error2.txt', the DOSFS detects this as a long file
> name and then executes the below code in function
> msdos_find_name_in_fat_file(), while creating the file.
>
> *if**(*name_type*==*MSDOS_NAME_LONG*)*
> *{*
> *int*slot*=**(((*empty_space_offset***bts2rd*)**+*empty_space_entry*)**/*
> MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE*)**+*lfn_entries*+*1*;*
> msdos_short_name_hex*(*MSDOS_DIR_NAME*(*name_dir_entry*),*slot*);*
> *}*
>
> The above piece of code modifies the file name as ERR~0005.TXT. This is
> the file name seen when we see the contents of the card on a Windows
> based machine using card reader. The file name of the file as seen from
> the RTEMS shell is still 'Error2.txt'
>
> Can anyone guide as what should be done to see a the correct file name
> (Error2.txt) on the Windows machine?
>

You have used mixed case and this cannot be handled with a short file
name therefore it has used a long file name which does maintain the
case. Windows should notice this and show the short and long filenames.

> Regards,
>
> Ali
>
>
> ------------------------------------------------------------------------
> 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.
>

You have posted to a public mailing list. Please check the polices
statement [1] before posting again.

Chris

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 users mailing list