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

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

Reply via email to