mirror of
https://github.com/kdave/btrfs-progs
synced 2024-12-23 22:53:35 +00:00
btrfs-progs: inspect-internal: convert help text to option formatter
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
5dd9506409
commit
251d397870
@ -60,18 +60,17 @@ static const char * const cmd_inspect_dump_super_usage[] = {
|
||||
"btrfs inspect-internal dump-super [options] device [device...]",
|
||||
"Dump superblock from a device in a textual form",
|
||||
"",
|
||||
"-f|--full print full superblock information, backup roots etc.",
|
||||
"-a|--all print information about all superblocks",
|
||||
"-s|--super <super> specify which copy to print out (values: 0, 1, 2)",
|
||||
"-F|--force attempt to dump superblocks with bad magic",
|
||||
"--bytenr <offset> specify alternate superblock offset",
|
||||
OPTLINE("-f|--full", "print full superblock information, backup roots etc."),
|
||||
OPTLINE("-a|--all", "print information about all superblocks"),
|
||||
OPTLINE("-s|--super <super>", "specify which copy to print out (values: 0, 1, 2)"),
|
||||
OPTLINE("-F|--force", "attempt to dump superblocks with bad magic"),
|
||||
OPTLINE("--bytenr <offset>", "specify alternate superblock offset"),
|
||||
"",
|
||||
"Deprecated syntax:",
|
||||
"-s <bytenr> specify alternate superblock offset, values other than 0, 1, 2",
|
||||
" will be interpreted as --bytenr for backward compatibility,",
|
||||
" option renamed for consistency with other tools (eg. check)",
|
||||
"-i <super> specify which copy to print out (values: 0, 1, 2), now moved",
|
||||
" to -s|--super",
|
||||
OPTLINE("-s <bytenr>", "specify alternate superblock offset, values other than 0, 1, 2 "
|
||||
"will be interpreted as --bytenr for backward compatibility, "
|
||||
"option renamed for consistency with other tools (eg. check)"),
|
||||
OPTLINE("-i <super>", "specify which copy to print out (values: 0, 1, 2), now moved to --super"),
|
||||
NULL
|
||||
};
|
||||
|
||||
|
@ -207,21 +207,20 @@ static const char * const cmd_inspect_dump_tree_usage[] = {
|
||||
"Note: contains file names, consider that if you're asked to send the dump",
|
||||
"for analysis.",
|
||||
"",
|
||||
"-e|--extents print only extent info: extent and device trees",
|
||||
"-d|--device print only device info: tree root, chunk and device trees",
|
||||
"-r|--roots print only short root node info",
|
||||
"-R|--backups same as --roots plus print backup root info",
|
||||
"-u|--uuid print only the uuid tree",
|
||||
"-b|--block <block_num> print info from the specified block only",
|
||||
" can be specified multiple times",
|
||||
"-t|--tree <tree_id> print only tree with the given id (string or number)",
|
||||
"--follow use with -b, to show all children tree blocks of <block_num>",
|
||||
"--noscan do not scan the devices from the filesystem, use only the listed ones",
|
||||
"--bfs breadth-first traversal of the trees, print nodes, then leaves (default)",
|
||||
"--dfs depth-first traversal of the trees",
|
||||
"--hide-names hide filenames/subvolume/xattrs and other name references",
|
||||
"--csum-headers print node checksums stored in headers (metadata)",
|
||||
"--csum-items print checksums stored in checksum items (data)",
|
||||
OPTLINE("-e|--extents", "print only extent info: extent and device trees"),
|
||||
OPTLINE("-d|--device", "print only device info: tree root, chunk and device trees"),
|
||||
OPTLINE("-r|--roots", "print only short root node info"),
|
||||
OPTLINE("-R|--backups", "same as --roots plus print backup root info"),
|
||||
OPTLINE("-u|--uuid", "print only the uuid tree"),
|
||||
OPTLINE("-b|--block <block_num>", "print info from the specified block only can be specified multiple times"),
|
||||
OPTLINE("-t|--tree <tree_id>", "print only tree with the given id (string or number)"),
|
||||
OPTLINE("--follow", "use with -b, to show all children tree blocks of <block_num>"),
|
||||
OPTLINE("--noscan", "do not scan the devices from the filesystem, use only the listed ones"),
|
||||
OPTLINE("--bfs", "breadth-first traversal of the trees, print nodes, then leaves (default)"),
|
||||
OPTLINE("--dfs", "depth-first traversal of the trees"),
|
||||
OPTLINE("--hide-names", "hide filenames/subvolume/xattrs and other name references"),
|
||||
OPTLINE("--csum-headers", "print node checksums stored in headers (metadata)"),
|
||||
OPTLINE("--csum-items", "print checksums stored in checksum items (data)"),
|
||||
NULL
|
||||
};
|
||||
|
||||
|
@ -434,7 +434,7 @@ static const char * const cmd_inspect_tree_stats_usage[] = {
|
||||
"btrfs inspect-internal tree-stats [options] <device>",
|
||||
"Print various stats for trees",
|
||||
"",
|
||||
"-b raw numbers in bytes",
|
||||
OPTLINE("-b", "raw numbers in bytes"),
|
||||
NULL
|
||||
};
|
||||
|
||||
|
@ -94,7 +94,7 @@ static const char * const cmd_inspect_inode_resolve_usage[] = {
|
||||
"btrfs inspect-internal inode-resolve [-v] <inode> <path>",
|
||||
"Get file system paths for the given inode",
|
||||
"",
|
||||
"-v deprecated, alias for global -v option",
|
||||
OPTLINE("-v", "deprecated, alias for global -v option"),
|
||||
HELPINFO_INSERT_GLOBALS,
|
||||
HELPINFO_INSERT_VERBOSE,
|
||||
NULL
|
||||
@ -140,14 +140,13 @@ static const char * const cmd_inspect_logical_resolve_usage[] = {
|
||||
"btrfs inspect-internal logical-resolve [-Pvo] [-s bufsize] <logical> <path>",
|
||||
"Get file system paths for the given logical address",
|
||||
"",
|
||||
"-P skip the path resolving and print the inodes instead",
|
||||
"-o ignore offsets when matching references (requires v2 ioctl",
|
||||
" support in the kernel 4.15+)",
|
||||
"-s bufsize set inode container's size. This is used to increase inode",
|
||||
" container's size in case it is not enough to read all the ",
|
||||
" resolved results. The max value one can set is 64k with the",
|
||||
" v1 ioctl. Sizes over 64k will use the v2 ioctl (kernel 4.15+)",
|
||||
"-v deprecated, alias for global -v option",
|
||||
OPTLINE("-P", "skip the path resolving and print the inodes instead"),
|
||||
OPTLINE("-o", "ignore offsets when matching references (requires v2 ioctl support in the kernel 4.15+)"),
|
||||
OPTLINE("-s bufsize", "set inode container's size. This is used to increase inode "
|
||||
"container's size in case it is not enough to read all the "
|
||||
"resolved results. The max value one can set is 64k with the "
|
||||
"v1 ioctl. Sizes over 64k will use the v2 ioctl (kernel 4.15+)"),
|
||||
OPTLINE("-v", "deprecated, alias for global -v option"),
|
||||
HELPINFO_INSERT_GLOBALS,
|
||||
HELPINFO_INSERT_VERBOSE,
|
||||
NULL
|
||||
@ -403,7 +402,7 @@ static const char* const cmd_inspect_min_dev_size_usage[] = {
|
||||
"Get the minimum size the device can be shrunk to",
|
||||
"",
|
||||
"The device id 1 is used by default.",
|
||||
"--id DEVID specify the device id to query",
|
||||
OPTLINE("--id DEVID", "specify the device id to query"),
|
||||
NULL
|
||||
};
|
||||
|
||||
@ -700,12 +699,11 @@ static const char * const cmd_inspect_list_chunks_usage[] = {
|
||||
"Show chunks (block groups) layout for all devices",
|
||||
"",
|
||||
HELPINFO_UNITS_LONG,
|
||||
"--sort=MODE sort by the physical or logical chunk start",
|
||||
" MODE is one of pstart or lstart (default: pstart)",
|
||||
"--usage show usage per block group (note: this can be slow)",
|
||||
"--no-usage don't show usage per block group",
|
||||
"--empty show empty space between block groups",
|
||||
"--no-empty do not show empty space between block groups",
|
||||
OPTLINE("--sort MODE", "sort by the physical or logical chunk start MODE is one of pstart or lstart (default: pstart)"),
|
||||
OPTLINE("--usage", "show usage per block group (note: this can be slow)"),
|
||||
OPTLINE("--no-usage", "don't show usage per block group"),
|
||||
OPTLINE("--empty", "show empty space between block groups"),
|
||||
OPTLINE("--no-empty", "do not show empty space between block groups"),
|
||||
NULL
|
||||
};
|
||||
|
||||
@ -1126,7 +1124,7 @@ static const char * const cmd_inspect_map_swapfile_usage[] = {
|
||||
"Use the value of resume offset for /sys/power/resume_offset, this depends on the",
|
||||
"page size that's detected on this system.",
|
||||
"",
|
||||
"-r|--resume-offset print only the value of resume_offset",
|
||||
OPTLINE("-r|--resume-offset", "print only the value of resume_offset"),
|
||||
NULL
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user