[PATCH] fs: fat: do not mangle short filenames

Tom Rini trini at konsulko.com
Tue Mar 21 16:54:04 CET 2023


On Tue, Mar 21, 2023 at 04:53:22PM +0100, Stefan Herbrechtsmeier wrote:
> 
> Am 21.03.2023 um 16:35 schrieb Tom Rini:
> > On Tue, Mar 21, 2023 at 08:43:07AM +0100, Stefan Herbrechtsmeier wrote:
> > > Am 20.03.2023 um 18:01 schrieb Tom Rini:
> > > > On Fri, Mar 17, 2023 at 01:04:13PM +0100, Stefan Herbrechtsmeier wrote:
> > > > 
> > > > > From: Stefan Herbrechtsmeier <stefan.herbrechtsmeier at weidmueller.com>
> > > > > 
> > > > > Do not mangle lower or mixed case filenames which fit into the upper
> > > > > case 8.3 short filename. This ensures FAT standard compatible short
> > > > > filenames (SFN) to support systems without long filename (LFN) support
> > > > > like boot roms (ex. SFN BOOT.BIN instead of BOOT~1.BIN for LFN
> > > > > boot.bin).
> > > > > 
> > > > > Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier at weidmueller.com>
> > > > > 
> > > > > ---
> > > > > 
> > > > >    fs/fat/fat_write.c | 11 +++++++----
> > > > >    1 file changed, 7 insertions(+), 4 deletions(-)
> > > > Can we update test/py/tests/test_fs/ somewhere to have a test for this
> > > > case? Thanks.
> > > What is the recommended approach to test internal behavior? The short name
> > > isn't avialable at the terminal because u-boot support VFAT.
> > Well, you triggered this problem with a filesystem that had contents
> > that were "just so" and then didn't work as expected, yes?
> 
> 
> No, I write a file to a file system and the boot rom do not find the file
> because the name was wrong (BOOT~1.BIN instead of BOOT.BIN).
> 
> The mdir command shows the short and long file name. I will add a
> test_fat.py with a test.

Ah, ok, and great, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20230321/91a82f2d/attachment.sig>


More information about the U-Boot mailing list