All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Namjae Jeon" <namjae.jeon@samsung.com>
To: "'Hyeongseok.Kim'" <hyeongseok@gmail.com>
Cc: <linux-fsdevel@vger.kernel.org>, <sj1557.seo@samsung.com>
Subject: RE: [PATCH] exfat: clear filename field before setting initial name
Date: Tue, 9 Jun 2020 11:36:35 +0900	[thread overview]
Message-ID: <00b601d63e06$cb54b360$61fe1a20$@samsung.com> (raw)
In-Reply-To: <1591663760-6418-1-git-send-email-Hyeongseok@gmail.com>

Hi Hyeongseok,

> Some fsck tool complain that padding part of the FileName Field is not set to the value 0000h. So
> let's follow the filesystem spec.
> 
> Signed-off-by: Hyeongseok.Kim <Hyeongseok@gmail.com>
> ---
>  fs/exfat/dir.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/fs/exfat/dir.c b/fs/exfat/dir.c index de43534..6c9810b 100644
> --- a/fs/exfat/dir.c
> +++ b/fs/exfat/dir.c
> @@ -424,6 +424,9 @@ static void exfat_init_name_entry(struct exfat_dentry *ep,
>  	exfat_set_entry_type(ep, TYPE_EXTEND);
>  	ep->dentry.name.flags = 0x0;
> 
> +	memset(ep->dentry.name.unicode_0_14, 0,
> +		sizeof(ep->dentry.name.unicode_0_14));
> +
>  	for (i = 0; i < EXFAT_FILE_NAME_LEN; i++) {
>  		ep->dentry.name.unicode_0_14[i] = cpu_to_le16(*uniname);
>  		if (*uniname == 0x0)
Wouldn't it be better to fill the rest with 0x0000 in this loop?
> --
> 2.7.4



  reply	other threads:[~2020-06-09  2:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20200609004931epcas1p3f2b10c4dea5b6d236fd1741532b529ec@epcas1p3.samsung.com>
2020-06-09  0:49 ` [PATCH] exfat: clear filename field before setting initial name Hyeongseok.Kim
2020-06-09  2:36   ` Namjae Jeon [this message]
2020-06-09  3:25     ` hyeongseok
2020-06-09  3:03   ` Sungjong Seo
2020-06-09  3:23     ` hyeongseok
2020-06-09  4:55       ` Sungjong Seo
2020-06-09  5:27         ` hyeongseok

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='00b601d63e06$cb54b360$61fe1a20$@samsung.com' \
    --to=namjae.jeon@samsung.com \
    --cc=hyeongseok@gmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=sj1557.seo@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.