Skip to content
Commit 42cd759a authored by Heinrich Schuchardt's avatar Heinrich Schuchardt Committed by Tom Rini
Browse files

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: default avatarDan Carpenter <dan.carpenter@linaro.org>
Fixes: 57b745e2 ("fs: fat: call set_name() only once")
Fixes: 28cef9ca ("fs: fat: create correct short names")
Signed-off-by: default avatarHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
parent e205fbce
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment