From: Jaegeuk Kim <jaegeuk@kernel.org>
To: linux-f2fs-devel@lists.sourceforge.net
Cc: Jaegeuk Kim <jaegeuk@kernel.org>
Subject: [PATCH 2/2] mkfs.f2fs: drop initial spaces for feature string
Date: Mon, 5 Jun 2017 18:34:57 -0700 [thread overview]
Message-ID: <20170606013457.67454-2-jaegeuk@kernel.org> (raw)
In-Reply-To: <20170606013457.67454-1-jaegeuk@kernel.org>
This patch removes initial spaces to detect correct feature string.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
mkfs/f2fs_format_main.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/mkfs/f2fs_format_main.c b/mkfs/f2fs_format_main.c
index e645ccb..a3652a9 100644
--- a/mkfs/f2fs_format_main.c
+++ b/mkfs/f2fs_format_main.c
@@ -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 {
--
2.13.0.rc1.294.g07d810a77f-goog
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
prev parent reply other threads:[~2017-06-06 1:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-06 1:34 [PATCH 1/2] f2fs-tools: avoid build warnings Jaegeuk Kim
2017-06-06 1:34 ` Jaegeuk Kim [this message]
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=20170606013457.67454-2-jaegeuk@kernel.org \
--to=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
/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).