From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jaegeuk Kim Subject: [PATCH 2/2] mkfs.f2fs: drop initial spaces for feature string Date: Mon, 5 Jun 2017 18:34:57 -0700 Message-ID: <20170606013457.67454-2-jaegeuk@kernel.org> References: <20170606013457.67454-1-jaegeuk@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from sog-mx-2.v43.ch3.sourceforge.com ([172.29.43.192] helo=mx.sourceforge.net) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1dI3Om-0006dV-0Y for linux-f2fs-devel@lists.sourceforge.net; Tue, 06 Jun 2017 01:35:08 +0000 Received: from mail.kernel.org ([198.145.29.99]) by sog-mx-2.v43.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) id 1dI3Ok-0008Uc-3G for linux-f2fs-devel@lists.sourceforge.net; Tue, 06 Jun 2017 01:35:07 +0000 In-Reply-To: <20170606013457.67454-1-jaegeuk@kernel.org> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net To: linux-f2fs-devel@lists.sourceforge.net Cc: Jaegeuk Kim This patch removes initial spaces to detect correct feature string. Signed-off-by: Jaegeuk Kim --- 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