]> git.baikalelectronics.ru Git - uboot.git/commit
fs: fat: create correct short names
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Fri, 20 Nov 2020 11:55:22 +0000 (12:55 +0100)
committerHeinrich Schuchardt <xypron.glpk@gmx.de>
Thu, 10 Dec 2020 08:14:58 +0000 (09:14 +0100)
commitf8e131afe6a6f9ca842687274576785e60e1245f
tree4b7a85c8a95d802c219436794273d8f16b5a054b
parent26c06c4836a527373c665a8fb24f15ec05f2426e
fs: fat: create correct short names

The current function set_name() used to create short names has the
following deficiencies resolved by this patch:

* Long names (e.g. FOO.TXT) are stored even if a short name is enough.
* Short names with spaces are created, e.g. "A     ~1.TXT".
* Short names with illegal characters are created, e.g. "FOO++BAR".
* Debug output does not not consider that the short file name has no
  concluding '\0'.

The solution for the following bug is split of into a separate patch:

* Short file names must be unique.

This patch only provides the loop over possible short file names.

Fixes: c30a15e590c ("FAT: Add FAT write feature")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
fs/fat/fat_write.c
lib/Kconfig