From patchwork Thu Aug 24 04:03:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Misono Tomohiro X-Patchwork-Id: 9918961 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4C53660353 for ; Thu, 24 Aug 2017 04:15:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 36B0528AA4 for ; Thu, 24 Aug 2017 04:15:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2B79428B19; Thu, 24 Aug 2017 04:15:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1956828AA4 for ; Thu, 24 Aug 2017 04:15:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751061AbdHXEPF (ORCPT ); Thu, 24 Aug 2017 00:15:05 -0400 Received: from mgwkm01.jp.fujitsu.com ([202.219.69.168]:23657 "EHLO mgwkm01.jp.fujitsu.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750806AbdHXEPE (ORCPT ); Thu, 24 Aug 2017 00:15:04 -0400 X-Greylist: delayed 678 seconds by postgrey-1.27 at vger.kernel.org; Thu, 24 Aug 2017 00:15:04 EDT Received: from kw-mxoi2.gw.nic.fujitsu.com (unknown [192.168.231.133]) by mgwkm01.jp.fujitsu.com with smtp id 4154_dc55_33a1f8fe_8a38_4405_96a7_af1051b7dff2; Thu, 24 Aug 2017 13:03:41 +0900 Received: from g01jpfmpwkw01.exch.g01.fujitsu.local (g01jpfmpwkw01.exch.g01.fujitsu.local [10.0.193.38]) by kw-mxoi2.gw.nic.fujitsu.com (Postfix) with ESMTP id EE3A6AC0127 for ; Thu, 24 Aug 2017 13:03:41 +0900 (JST) Received: from G01JPEXCHKW17.g01.fujitsu.local (G01JPEXCHKW17.g01.fujitsu.local [10.0.194.56]) by g01jpfmpwkw01.exch.g01.fujitsu.local (Postfix) with ESMTP id 58F056926E3 for ; Thu, 24 Aug 2017 13:03:41 +0900 (JST) X-SecurityPolicyCheck: OK by SHieldMailChecker v2.5.2 X-SHieldMailCheckerPolicyVersion: FJ-ISEC-20170217-enc X-SHieldMailCheckerMailID: 1aa188a6c47143f29c9a8a3391127f55 To: From: "Misono, Tomohiro" Subject: [PATCH 1/3] btrfs-progs: fix option handling for some commands Message-ID: Date: Thu, 24 Aug 2017 13:03:37 +0900 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 Content-Language: en-US X-SecurityPolicyCheck-GC: OK by FENCE-Mail X-TM-AS-MML: disable Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP I found some btrfs commands options are not working because of inappropriate getopt_long() setting. This fixes "btrfs check -Q/-E" Signed-off-by: Tomohiro Misono ---  cmds-check.c | 2 +-  1 file changed, 1 insertion(+), 1 deletion(-)                 switch(c) { diff --git a/cmds-check.c b/cmds-check.c index c5faa2b..465fd17 100644 --- a/cmds-check.c +++ b/cmds-check.c @@ -12745,7 +12745,7 @@ int cmd_check(int argc, char **argv)                         { NULL, 0, NULL, 0}                 }; -               c = getopt_long(argc, argv, "as:br:p", long_options, NULL); +               c = getopt_long(argc, argv, "as:br:pQE:", long_options, NULL);                 if (c < 0)                         break;