DOSFS and the short and Long file names.

Chris Johns chrisj at rtems.org
Sun Aug 7 23:49:11 UTC 2011


On 6/08/11 7:23 PM, ali nasir wrote:
>
> *"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);

Correct and just use the long file name (LFN) with the correct packing 
for a SFN and all uppercase characters as the SFN. You would need to add 
this bit of code.

> 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?

Yes. We still have a long file name due to the mixed case but we also 
have a short file name. You would need to add code to make the new short 
file name.

If you create a patch please create PR in bugzilla and attach the patch. 
A change like this would also be applied to 4.10.

Thanks.
Chris



More information about the users mailing list