Skip to content

Commit

Permalink
btrfs-progs: restore: convert help text to option formatter
Browse files Browse the repository at this point in the history
Signed-off-by: David Sterba <dsterba@suse.com>
  • Loading branch information
kdave committed Feb 22, 2023
1 parent 353e033 commit e1986d2
Showing 1 changed file with 29 additions and 25 deletions.
54 changes: 29 additions & 25 deletions cmds/restore.c
Original file line number Diff line number Diff line change
Expand Up @@ -1333,31 +1333,35 @@ static const char * const cmd_restore_usage[] = {
"btrfs restore [options] -l <device>",
"Try to restore files from a damaged filesystem (unmounted)",
"",
" control:",
" -D|--dry-run dry run (only list files that would be recovered)",
" -i|--ignore-errors ignore errors",
" -o|--overwrite overwrite",
" restoration:",
" -m|--metadata restore owner, mode and times",
" -S|--symlink restore symbolic links",
" -s|--snapshots get snapshots",
" -x|--xattr restore extended attributes",
" filtering:",
" --path-regex <regex>",
" restore only filenames matching regex,",
" you have to use following syntax (possibly quoted):",
" ^/(|home(|/username(|/Desktop(|/.*))))$",
" -c ignore case (--path-regex only)",
" analysis:",
" -d find dir",
" -l|--list-roots list tree roots",
" alternate starting point:",
" -f <bytenr> filesystem location",
" -r|--root <rootid> root objectid",
" -t <bytenr> tree location",
" -u|--super <mirror> super mirror",
" other:",
" -v|--verbose deprecated, alias for global -v option",
"Control:",
OPTLINE("-D|--dry-run", "dry run (only list files that would be recovered)"),
OPTLINE("-i|--ignore-errors", "ignore errors"),
OPTLINE("-o|--overwrite", "overwrite"),
"",
"Restoration:",
OPTLINE("-m|--metadata", "restore owner, mode and times"),
OPTLINE("-S|--symlink", "restore symbolic links"),
OPTLINE("-s|--snapshots", "get snapshots"),
OPTLINE("-x|--xattr", "restore extended attributes"),
"",
"Filtering:",
OPTLINE("--path-regex <regex>", "restore only filenames matching regex, "
"you have to use following syntax (possibly quoted): "
"^/(|home(|/username(|/Desktop(|/.*))))$"),
OPTLINE("-c", "ignore case (--path-regex only)"),
"",
"Analysis:",
OPTLINE("-d", "find dir"),
OPTLINE("-l|--list-roots", "list tree roots"),
"",
"Alternate starting point:",
OPTLINE("-f <bytenr>", "filesystem location"),
OPTLINE("-r|--root <rootid>", "root objectid"),
OPTLINE("-t <bytenr>", "tree location"),
OPTLINE("-u|--super <mirror>", "super mirror"),
"",
"Other:",
OPTLINE("-v|--verbose", "deprecated, alias for global -v option"),
HELPINFO_INSERT_GLOBALS,
HELPINFO_INSERT_VERBOSE,
"",
Expand Down

0 comments on commit e1986d2

Please sign in to comment.