Previous code didn't cover cases where c.vol_label was actually initialized with an empty string
Signed-off-by: Park Ju Hyung <qkrwngud...@gmail.com> --- mkfs/f2fs_format_main.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mkfs/f2fs_format_main.c b/mkfs/f2fs_format_main.c index 3fffec8..94a2a53 100644 --- a/mkfs/f2fs_format_main.c +++ b/mkfs/f2fs_format_main.c @@ -76,8 +76,11 @@ static void f2fs_show_info() if (c.extension_list[1]) INFO_MSG("Adding new hot file extension list\n"); - if (c.vol_label) - INFO_MSG("Label = %s\n", c.vol_label); + INFO_MSG("Label = "); + if (c.vol_label && c.vol_label[0] != '\0') + MSG(0, "%s\n", c.vol_label); + else + MSG(0, "(empty)\n"); INFO_MSG("%s trim\n", c.trim ? "Enabling": "Disabling"); } -- 2.16.2 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel