diff mbox

[2/3] btrfs-progs: add missing help option for rescue super-recover

Message ID 1400117349-2851-2-git-send-email-guihc.fnst@cn.fujitsu.com (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Gui Hecheng May 15, 2014, 1:29 a.m. UTC
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(-)

Comments

David Sterba May 16, 2014, 4:37 p.m. UTC | #1
On Thu, May 15, 2014 at 09:29:08AM +0800, Gui Hecheng wrote:
> Add '-h' option for help for super-recover,
> update the manpage at the same time.

We don't have the short option for help, a few patches have been already
rejected to change that.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Sterba May 16, 2014, 4:41 p.m. UTC | #2
On Fri, May 16, 2014 at 06:37:27PM +0200, David Sterba wrote:
> On Thu, May 15, 2014 at 09:29:08AM +0800, Gui Hecheng wrote:
> > Add '-h' option for help for super-recover,
> > update the manpage at the same time.
> 
> We don't have the short option for help, a few patches have been already
> rejected to change that.

Reference: https://www.mail-archive.com/linux-btrfs@vger.kernel.org/msg30759.html
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Gui Hecheng May 19, 2014, 1:35 a.m. UTC | #3
On Fri, 2014-05-16 at 18:41 +0200, David Sterba wrote:
> On Fri, May 16, 2014 at 06:37:27PM +0200, David Sterba wrote:
> > On Thu, May 15, 2014 at 09:29:08AM +0800, Gui Hecheng wrote:
> > > Add '-h' option for help for super-recover,
> > > update the manpage at the same time.
> > 
> > We don't have the short option for help, a few patches have been already
> > rejected to change that.
> 
> Reference: https://www.mail-archive.com/linux-btrfs@vger.kernel.org/msg30759.html

Yes, I get it. Thanks David.

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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);
 		}