linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
From: "Tiezhu Yang" <kernelpatch@126.com>
To: jaegeuk@kernel.org, yuchao0@huawei.com
Cc: linux-f2fs-devel@lists.sourceforge.net
Subject: [PATCH] mkfs.f2fs: show the info of volume label only when specify it
Date: Mon, 8 Oct 2018 20:39:07 +0800 (CST)	[thread overview]
Message-ID: <7d9354b8.ca7b.16653b02e86.Coremail.kernelpatch@126.com> (raw)

Currently, when format disk used with mkfs.f2fs, even if the volume label
is not specified, it still shows the info of volume label with no content
due to the check condition is always true, this patch fixes it.

[root@localhost home]# mkfs.f2fs -f /dev/sdb1

	F2FS-tools: mkfs.f2fs Ver: 1.12.0 (2018-10-08)

Info: Disable heap-based policy
Info: Debug level = 0
Info: Label = 
Info: Trim is enabled

Signed-off-by: Tiezhu Yang <kernelpatch@126.com>
---
 mkfs/f2fs_format_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mkfs/f2fs_format_main.c b/mkfs/f2fs_format_main.c
index 1424cc3..6ea8068 100644
--- a/mkfs/f2fs_format_main.c
+++ b/mkfs/f2fs_format_main.c
@@ -81,7 +81,7 @@ static void f2fs_show_info()
 	if (c.extension_list[1])
 		MSG(0, "Info: Add new hot file extension list\n");
 
-	if (c.vol_label)
+	if (strlen(c.vol_label))
 		MSG(0, "Info: Label = %s\n", c.vol_label);
 	MSG(0, "Info: Trim is %s\n", c.trim ? "enabled": "disabled");
 
-- 
1.8.3.1

             reply	other threads:[~2018-10-08 12:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-08 12:39 Tiezhu Yang [this message]
2018-10-15 12:08 ` [PATCH] mkfs.f2fs: show the info of volume label only when specify it Chao Yu

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=7d9354b8.ca7b.16653b02e86.Coremail.kernelpatch@126.com \
    --to=kernelpatch@126.com \
    --cc=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=yuchao0@huawei.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 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).