From d51075f05b10ae83342e1700505ebed6b86cc7eb Mon Sep 17 00:00:00 2001 From: David Sterba Date: Sat, 12 Jun 2021 21:36:00 +0200 Subject: [PATCH] btrfs-progs: restore: group help options Group the options in the help text by the purpose for clarity. Signed-off-by: David Sterba --- cmds/restore.c | 47 +++++++++++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 20 deletions(-) diff --git a/cmds/restore.c b/cmds/restore.c index 8849beeb..39fcc69d 100644 --- a/cmds/restore.c +++ b/cmds/restore.c @@ -1321,28 +1321,35 @@ out: } static const char * const cmd_restore_usage[] = { - "btrfs restore [options] | -l ", + "btrfs restore [options] \n" + "btrfs restore [options] -l ", "Try to restore files from a damaged filesystem (unmounted)", "", - "-s|--snapshots get snapshots", - "-x|--xattr restore extended attributes", - "-m|--metadata restore owner, mode and times", - "-S|--symlink restore symbolic links", - "-i|--ignore-errors ignore errors", - "-o|--overwrite overwrite", - "-t tree location", - "-f filesystem location", - "-u|--super super mirror", - "-r|--root root objectid", - "-d find dir", - "-l|--list-roots list tree roots", - "-D|--dry-run dry run (only list files that would be recovered)", - "--path-regex ", - " restore only filenames matching regex,", - " you have to use following syntax (possibly quoted):", - " ^/(|home(|/username(|/Desktop(|/.*))))$", - "-c ignore case (--path-regex only)", - "-v|--verbose deprecated, alias for global -v option", + " 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 ", + " 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 filesystem location", + " -r|--root root objectid", + " -t tree location", + " -u|--super super mirror", + " other:", + " -v|--verbose deprecated, alias for global -v option", HELPINFO_INSERT_GLOBALS, HELPINFO_INSERT_VERBOSE, NULL