linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] exfat: Set the unused characters of FileName field to the value 0000h
@ 2020-06-09  5:30 ` Hyeongseok.Kim
  2020-06-09  7:46   ` Sungjong Seo
  0 siblings, 1 reply; 4+ messages in thread
From: Hyeongseok.Kim @ 2020-06-09  5:30 UTC (permalink / raw)
  To: namjae.jeon, sj1557.seo; +Cc: linux-fsdevel, Hyeongseok.Kim

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.

Signe-off-by: Hyeongseok.Kim <Hyeongseok@gmail.com>
---
 fs/exfat/dir.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/fs/exfat/dir.c b/fs/exfat/dir.c
index de43534..8e775bd 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;
+		}
 	}
 }
 
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* RE: [PATCH v2] exfat: Set the unused characters of FileName field to the value 0000h
  2020-06-09  5:30 ` [PATCH v2] exfat: Set the unused characters of FileName field to the value 0000h Hyeongseok.Kim
@ 2020-06-09  7:46   ` Sungjong Seo
  2020-06-10  2:59     ` Namjae Jeon
  0 siblings, 1 reply; 4+ messages in thread
From: Sungjong Seo @ 2020-06-09  7:46 UTC (permalink / raw)
  To: 'Hyeongseok.Kim', namjae.jeon; +Cc: linux-fsdevel

> 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.
> 
> Signe-off-by: Hyeongseok.Kim <Hyeongseok@gmail.com>

Reviewed-by: Sungjong Seo <sj1557.seo@samsung.com>

Looks good to me. Thanks.

> ---
>  fs/exfat/dir.c | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/fs/exfat/dir.c b/fs/exfat/dir.c index de43534..8e775bd 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;
> +		}
>  	}
>  }
> 
> --
> 2.7.4



^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [PATCH v2] exfat: Set the unused characters of FileName field to the value 0000h
  2020-06-09  7:46   ` Sungjong Seo
@ 2020-06-10  2:59     ` Namjae Jeon
  2020-06-11  0:22       ` hyeongseok
  0 siblings, 1 reply; 4+ messages in thread
From: Namjae Jeon @ 2020-06-10  2:59 UTC (permalink / raw)
  To: 'Hyeongseok.Kim'; +Cc: linux-fsdevel, 'Sungjong Seo'

> > 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.
> >
> > Signe-off-by: Hyeongseok.Kim <Hyeongseok@gmail.com>
Fixed a typo: Signe -> Signed.
> 
> Reviewed-by: Sungjong Seo <sj1557.seo@samsung.com>
> 
> Looks good to me. Thanks.
Applied. Thanks!


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] exfat: Set the unused characters of FileName field to the value 0000h
  2020-06-10  2:59     ` Namjae Jeon
@ 2020-06-11  0:22       ` hyeongseok
  0 siblings, 0 replies; 4+ messages in thread
From: hyeongseok @ 2020-06-11  0:22 UTC (permalink / raw)
  To: Namjae Jeon; +Cc: linux-fsdevel, 'Sungjong Seo'

On 6/10/20 11:59 AM, Namjae Jeon wrote:
>>> 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.
>>>
>>> Signe-off-by: Hyeongseok.Kim <Hyeongseok@gmail.com>
> Fixed a typo: Signe -> Signed.
Oops.
Maybe I touched Signed-off-by tag while editing commit message, and 
forgot to do checkpatch on 2nd version.
I'm sorry for bothering you and Thanks for fixing it.
>> Reviewed-by: Sungjong Seo <sj1557.seo@samsung.com>
>>
>> Looks good to me. Thanks.
> Applied. Thanks!
>
>


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-06-11  0:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20200609053051epcas1p2dcc80d99a10bcc83e11fda481239e64a@epcas1p2.samsung.com>
2020-06-09  5:30 ` [PATCH v2] exfat: Set the unused characters of FileName field to the value 0000h Hyeongseok.Kim
2020-06-09  7:46   ` Sungjong Seo
2020-06-10  2:59     ` Namjae Jeon
2020-06-11  0:22       ` hyeongseok

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).