diff options
author | Hyeongseok.Kim <[email protected]> | 2020-06-09 14:30:44 +0900 |
---|---|---|
committer | Namjae Jeon <[email protected]> | 2020-06-29 17:11:00 +0900 |
commit | 4ba6ccd695f5ed3ae851e59b443b757bbe4557fe (patch) | |
tree | a227be75c8fe626dd9f7d5312b14ae77701713f1 | |
parent | 9ebcfadb0610322ac537dd7aa5d9cbc2b2894c68 (diff) |
exfat: Set the unused characters of FileName field to the value 0000h
Some fsck tool complain that padding part of the FileName field
is not set to the value 0000h. So let's maintain filesystem cleaner,
as exfat's spec. recommendation.
Signed-off-by: Hyeongseok.Kim <[email protected]>
Reviewed-by: Sungjong Seo <[email protected]>
Signed-off-by: Namjae Jeon <[email protected]>
-rw-r--r-- | fs/exfat/dir.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/exfat/dir.c b/fs/exfat/dir.c index de43534aa299..8e775bd5d523 100644 --- a/fs/exfat/dir.c +++ b/fs/exfat/dir.c @@ -425,10 +425,12 @@ static void exfat_init_name_entry(struct exfat_dentry *ep, ep->dentry.name.flags = 0x0; for (i = 0; i < EXFAT_FILE_NAME_LEN; i++) { - ep->dentry.name.unicode_0_14[i] = cpu_to_le16(*uniname); - if (*uniname == 0x0) - break; - uniname++; + if (*uniname != 0x0) { + ep->dentry.name.unicode_0_14[i] = cpu_to_le16(*uniname); + uniname++; + } else { + ep->dentry.name.unicode_0_14[i] = 0x0; + } } } |