From patchwork Thu May 15 01:29:08 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gui Hecheng X-Patchwork-Id: 4179011 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 29775BFF02 for ; Thu, 15 May 2014 01:33:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5B2382034E for ; Thu, 15 May 2014 01:33:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 55EE820265 for ; Thu, 15 May 2014 01:33:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752271AbaEOBdy (ORCPT ); Wed, 14 May 2014 21:33:54 -0400 Received: from cn.fujitsu.com ([59.151.112.132]:40341 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1752005AbaEOBdw (ORCPT ); Wed, 14 May 2014 21:33:52 -0400 X-IronPort-AV: E=Sophos;i="4.97,1055,1389715200"; d="scan'208";a="30541267" Received: from unknown (HELO edo.cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 15 May 2014 09:31:18 +0800 Received: from G08CNEXCHPEKD02.g08.fujitsu.local (localhost.localdomain [127.0.0.1]) by edo.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id s4F1Xogh007580 for ; Thu, 15 May 2014 09:33:50 +0800 Received: from localhost.localdomain (10.167.226.111) by G08CNEXCHPEKD02.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.146.2; Thu, 15 May 2014 09:33:50 +0800 From: Gui Hecheng To: CC: Gui Hecheng Subject: [PATCH 2/3] btrfs-progs: add missing help option for rescue super-recover Date: Thu, 15 May 2014 09:29:08 +0800 Message-ID: <1400117349-2851-2-git-send-email-guihc.fnst@cn.fujitsu.com> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1400117349-2851-1-git-send-email-guihc.fnst@cn.fujitsu.com> References: <1400117349-2851-1-git-send-email-guihc.fnst@cn.fujitsu.com> MIME-Version: 1.0 X-Originating-IP: [10.167.226.111] Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add '-h' option for help for super-recover, update the manpage at the same time. --- Documentation/btrfs-rescue.txt | 2 ++ cmds-rescue.c | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Documentation/btrfs-rescue.txt b/Documentation/btrfs-rescue.txt index f66ca85..f64d78b 100644 --- a/Documentation/btrfs-rescue.txt +++ b/Documentation/btrfs-rescue.txt @@ -39,6 +39,8 @@ Recover bad superblocks from good copies. assume an answer of 'yes' to all questions. -v:::: verbose mode. +-h:::: +help. EXIT STATUS ----------- diff --git a/cmds-rescue.c b/cmds-rescue.c index 7e0687e..9491d0c 100644 --- a/cmds-rescue.c +++ b/cmds-rescue.c @@ -49,6 +49,7 @@ const char * const cmd_super_recover_usage[] = { "", "-y Assume an answer of `yes' to all questions", "-v Verbose mode", + "-h Help", NULL }; @@ -124,7 +125,7 @@ int cmd_super_recover(int argc, char **argv) char *dname; while (1) { - int c = getopt(argc, argv, "vy"); + int c = getopt(argc, argv, "vyh"); if (c < 0) break; switch (c) { @@ -134,6 +135,7 @@ int cmd_super_recover(int argc, char **argv) case 'y': yes = 1; break; + case 'h': default: usage(cmd_super_recover_usage); }