u-boot/fs/fat
Heinrich Schuchardt 42cd759a37 fat: correct sign for deletion mark
The FAT file systems uses character '\xe5' to mark a deleted directory
entry. If a file name starts with this character, it is substituted by
'\x05' in the directory entry.

While (signed char)'\xe5' is a negative number 0xe5 is a positive integer
number. We therefore have define a constant DELETED_MARK which matches the
signedness of the characters in the directory entry.

Correct a comparison where we used the constant 0xe5 with the wrong sign.
Use the constant aRING instead of 0x05 like in the rest of the code.

Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Fixes: 57b745e238 ("fs: fat: call set_name() only once")
Fixes: 28cef9ca2e ("fs: fat: create correct short names")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-08-03 15:30:53 -04:00
..
fat.c fs: fat: Shrink the size of a few strings 2023-07-17 17:12:26 +08:00
fat_write.c fat: correct sign for deletion mark 2023-08-03 15:30:53 -04:00
Kconfig fs: FAT: Fix typo in FS_FAT_MAX_CLUSTSIZE description 2018-01-22 16:43:31 -05:00
Makefile spl: fat/fs: Add option to include/exclude FAT write build in SPL 2019-02-01 09:12:48 -05:00