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>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
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");