1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-06 00:58:48 +03:00

man lvcreate: show extents option

Display --extents as an option in each cmd def,
in addition to the special notes about how
--size and --extents are alternatives.
This commit is contained in:
David Teigland 2017-03-02 16:56:32 -06:00
parent 9a62767f2d
commit 1a0d57f895
2 changed files with 15 additions and 3 deletions

View File

@ -28,9 +28,9 @@ to improve performance.
.SS Usage notes
In the usage section below, \fB--size\fP \fINumber\fP can be replaced
in each case with \fB--extents\fP \fINumberExtents\fP. Also see both
descriptions the options section.
In the usage section below, \fB--size\fP \fISize\fP can be replaced
in each case with \fB--extents\fP \fINumber\fP. See both descriptions
the options section.
In the usage section below, \fB--name\fP is omitted from the required
options, even though it is typically used. When the name is not

View File

@ -2110,6 +2110,7 @@ void print_man_usage(char *lvmname, struct command *cmd)
int onereq = (cmd->cmd_flags & CMD_FLAG_ONE_REQUIRED_OPT) ? 1 : 0;
int sep, ro, rp, oo, op, opt_enum;
int need_ro_indent_end = 0;
int include_extents = 0;
if (!(cname = find_command_name(cmd->name)))
return;
@ -2239,6 +2240,10 @@ void print_man_usage(char *lvmname, struct command *cmd)
opt_enum = cmd->required_opt_args[ro].opt;
/* special case */
if (!strcmp(cmd->name, "lvcreate") && (opt_enum == size_ARG))
include_extents = 1;
if (opt_names[opt_enum].short_opt) {
printf(" \\fB-%c\\fP|\\fB%s\\fP",
opt_names[opt_enum].short_opt,
@ -2284,6 +2289,13 @@ void print_man_usage(char *lvmname, struct command *cmd)
if (cmd->oo_count) {
printf(".RS 4\n");
if (include_extents) {
printf(".ad l\n");
printf("[ \\fB-l\\fP|\\fB--extents\\fP \\fINumber\\fP[PERCENT] ]\n");
printf(".ad b\n");
sep = 1;
}
/* print optional options with short opts */
for (oo = 0; oo < cmd->oo_count; oo++) {