summaryrefslogtreecommitdiff
path: root/cmds-restore.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.cz>2015-04-29 18:26:08 +0200
committerDavid Sterba <dsterba@suse.cz>2015-05-14 15:41:06 +0200
commitbea9ba0acb38e8b3a49fa1b38b574dd79bdb1a42 (patch)
treee83cfd957cc4b447b6f27084fffaaeb4e235703c /cmds-restore.c
parent18b48340de1b415cc29f8cc52c990a6427e6d46c (diff)
btrfs-progs: restore: add more long option variants
Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'cmds-restore.c')
-rw-r--r--cmds-restore.c26
1 files changed, 17 insertions, 9 deletions
diff --git a/cmds-restore.c b/cmds-restore.c
index d7a3bb0b..8fc8b2a0 100644
--- a/cmds-restore.c
+++ b/cmds-restore.c
@@ -1386,19 +1386,19 @@ const char * const cmd_restore_usage[] = {
"btrfs restore [options] <device> <path> | -l <device>",
"Try to restore files from a damaged filesystem (unmounted)",
"",
- "-s get snapshots",
- "-x get extended attributes",
+ "-s|--snapshots get snapshots",
+ "-x|--xattr get extended attributes",
"-m|--metadata restore owner, mode and times",
- "-S|--symlinks restore symbolic links"
- "-v verbose",
- "-i ignore errors",
- "-o overwrite",
+ "-S|--symlinks restore symbolic links",
+ "-v|--verbose verbose",
+ "-i|--ignore-errors ignore errors",
+ "-o|--overwrite overwrite",
"-t <bytenr> tree location",
"-f <bytenr> filesystem location",
- "-u <mirror> super mirror",
- "-r <rootid> root objectid",
+ "-u|--super <mirror> super mirror",
+ "-r|--root <rootid> root objectid",
"-d find dir",
- "-l list tree roots",
+ "-l|--list-roots list tree roots",
"-D|--dry-run dry run (only list files that would be recovered)",
"--path-regex <regex>",
" restore only filenames matching regex,",
@@ -1433,6 +1433,14 @@ int cmd_restore(int argc, char **argv)
{ "dry-run", no_argument, NULL, 'D'},
{ "metadata", no_argument, NULL, 'm'},
{ "symlinks", no_argument, NULL, 'S'},
+ { "snapshots", no_argument, NULL, 's'},
+ { "xattr", no_argument, NULL, 'x'},
+ { "verbose", no_argument, NULL, 'v'},
+ { "ignore-errors", no_argument, NULL, 'i'},
+ { "overwrite", no_argument, NULL, 'o'},
+ { "super", required_argument, NULL, 'u'},
+ { "root", required_argument, NULL, 'r'},
+ { "list-roots", no_argument, NULL, 'l'},
{ NULL, 0, NULL, 0}
};