mkfs.f2fs: drop initial spaces for feature string
authorJaegeuk Kim <jaegeuk@kernel.org>
Tue, 6 Jun 2017 01:12:55 +0000 (18:12 -0700)
committerJaegeuk Kim <jaegeuk@kernel.org>
Tue, 6 Jun 2017 01:12:55 +0000 (18:12 -0700)
This patch removes initial spaces to detect correct feature string.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
mkfs/f2fs_format_main.c

index e645ccb..a3652a9 100644 (file)
@@ -70,6 +70,8 @@ static void f2fs_show_info()
 
 static void parse_feature(const char *features)
 {
+       while (*features == ' ')
+               features++;
        if (!strcmp(features, "encrypt")) {
                c.feature |= cpu_to_le32(F2FS_FEATURE_ENCRYPT);
        } else {