mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
tools: enhance lvdisplay vgdisplay pvdisplay
Split description for display commands so we can better describe it's usage and combination of individual options in man page. Now we can separately describe: lvdisplay, lvdisplay -c, lvdisplay -C vgdisplay, vgdisplay -c, vgdisplay -C pvdisplay, pvdisplay -c, pvdisplay -C TODO: Drop validation from command code itself.
This commit is contained in:
parent
502543ffed
commit
e8e4324d68
@ -206,15 +206,20 @@ OO_ALL: --commandprofile String, --config String, --debug,
|
||||
--driverloaded Bool, --help, --nolocking, --lockopt String, --longhelp, --profile String, --quiet,
|
||||
--verbose, --version, --yes, --test, --devicesfile String, --devices PV, --nohints --journal String
|
||||
|
||||
#
|
||||
# options for pvdisplay, lvdisplay, vgdisplay
|
||||
#
|
||||
OO_REPORTING: --all, --configreport ConfigReport, --foreign,
|
||||
--ignorelockingfailure, --logonly, --readonly, --reportformat ReportFmt,
|
||||
--select String, --shared, --sort String, --units Units
|
||||
|
||||
#
|
||||
# options for pvs, lvs, vgs, fullreport
|
||||
#
|
||||
OO_REPORT: --aligned, --all, --binary, --configreport ConfigReport, --foreign,
|
||||
--headings HeadingsType --ignorelockingfailure, --logonly,
|
||||
--nameprefixes, --noheadings, --nosuffix,
|
||||
--options String, --readonly, --reportformat ReportFmt, --rows,
|
||||
--select String, --separator String, --shared, --sort String,
|
||||
--unbuffered, --units Units, --unquoted
|
||||
OO_REPORT: OO_REPORTING, --aligned, --binary,
|
||||
--headings HeadingsType, --nameprefixes, --noheadings,
|
||||
--nosuffix, --options String, --rows, --separator String,
|
||||
--unbuffered, --unquoted
|
||||
|
||||
#
|
||||
# options for config, dumpconfig, lvmconfig
|
||||
@ -1386,15 +1391,23 @@ DESC: new LV to type writecache.
|
||||
|
||||
---
|
||||
|
||||
lvdisplay
|
||||
OO: --aligned, --all, --binary, --colon, --columns,
|
||||
--configreport ConfigReport, --foreign, --history, --ignorelockingfailure,
|
||||
--logonly, --maps, --noheadings,
|
||||
--nosuffix, --options String, --sort String, --readonly,
|
||||
--segments, --select String, --separator String,
|
||||
--shared, --unbuffered, --units Units
|
||||
lvdisplay --columns
|
||||
OO: OO_REPORT, --history, --segments
|
||||
OP: VG|LV|Tag ...
|
||||
IO: --partial, --ignoreskippedcluster, --reportformat ReportFmt
|
||||
IO: --partial, --ignoreskippedcluster
|
||||
RULE: --noheadings not --headings
|
||||
ID: lvdisplay_columns
|
||||
|
||||
lvdisplay --colon
|
||||
OO: OO_REPORTING, --history, --segments
|
||||
OP: VG|LV|Tag ...
|
||||
IO: --partial, --ignoreskippedcluster
|
||||
ID: lvdisplay_colon
|
||||
|
||||
lvdisplay
|
||||
OO: OO_REPORTING, --history, --segments, --maps
|
||||
OP: VG|LV|Tag ...
|
||||
IO: --partial, --ignoreskippedcluster
|
||||
ID: lvdisplay_general
|
||||
|
||||
---
|
||||
@ -1622,14 +1635,23 @@ RULE: --bootloaderareasize not --restorefile
|
||||
|
||||
---
|
||||
|
||||
pvdisplay
|
||||
OO: --aligned, --all, --binary, --colon, --columns, --configreport ConfigReport,
|
||||
--foreign, --ignorelockingfailure,
|
||||
--logonly, --maps, --noheadings, --nosuffix, --options String,
|
||||
--readonly, --reportformat ReportFmt, --select String, --separator String, --shared,
|
||||
--short, --sort String, --unbuffered, --units Units
|
||||
pvdisplay --columns
|
||||
OO: OO_REPORT, --segments
|
||||
OP: PV|Tag ...
|
||||
IO: --ignoreskippedcluster
|
||||
IO: --partial, --ignoreskippedcluster
|
||||
RULE: --noheadings not --headings
|
||||
ID: pvdisplay_columns
|
||||
|
||||
pvdisplay --colon
|
||||
OO: OO_REPORTING, --segments
|
||||
OP: PV|Tag ...
|
||||
IO: --partial, --ignoreskippedcluster
|
||||
ID: pvdisplay_colon
|
||||
|
||||
pvdisplay
|
||||
OO: OO_REPORTING, --maps, --segments, --short
|
||||
OP: PV|Tag ...
|
||||
IO: --partial, --ignoreskippedcluster
|
||||
ID: pvdisplay_general
|
||||
|
||||
---
|
||||
@ -1845,14 +1867,23 @@ ID: vgcreate_general
|
||||
|
||||
---
|
||||
|
||||
vgdisplay
|
||||
OO: --activevolumegroups, --aligned, --binary, --colon, --columns,
|
||||
--configreport ConfigReport, --foreign, --ignorelockingfailure,
|
||||
--logonly, --noheadings, --nosuffix,
|
||||
--options String, --readonly, --select String,
|
||||
--shared, --short, --separator String, --sort String, --unbuffered, --units Units
|
||||
vgdisplay --columns
|
||||
OO: OO_REPORT, --activevolumegroups
|
||||
OP: VG|Tag ...
|
||||
IO: --partial, --ignoreskippedcluster, --reportformat ReportFmt
|
||||
IO: --partial, --ignoreskippedcluster
|
||||
RULE: --noheadings not --headings
|
||||
ID: vgdisplay_columns
|
||||
|
||||
vgdisplay --colon
|
||||
OO: OO_REPORTING, --activevolumegroups
|
||||
OP: VG|Tag ...
|
||||
IO: --partial, --ignoreskippedcluster
|
||||
ID: vgdisplay_colon
|
||||
|
||||
vgdisplay
|
||||
OO: OO_REPORTING, --activevolumegroups, --short
|
||||
OP: VG|Tag ...
|
||||
IO: --partial, --ignoreskippedcluster
|
||||
ID: vgdisplay_general
|
||||
|
||||
---
|
||||
|
@ -60,3 +60,13 @@ int lvdisplay(struct cmd_context *cmd, int argc, char **argv)
|
||||
|
||||
return process_each_lv(cmd, argc, argv, NULL, NULL, 0, NULL, NULL, &_lvdisplay_single);
|
||||
}
|
||||
|
||||
int lvdisplay_columns_cmd(struct cmd_context *cmd, int argc, char **argv)
|
||||
{
|
||||
return lvdisplay(cmd, argc, argv);
|
||||
}
|
||||
|
||||
int lvdisplay_colon_cmd(struct cmd_context *cmd, int argc, char **argv)
|
||||
{
|
||||
return lvdisplay(cmd, argc, argv);
|
||||
}
|
||||
|
@ -88,6 +88,18 @@ static const struct command_function _command_functions[CMD_COUNT] = {
|
||||
{ vgchange_lockstop_CMD, vgchange_lock_start_stop_cmd },
|
||||
{ vgchange_systemid_CMD, vgchange_systemid_cmd },
|
||||
|
||||
/* lvdisplay variants */
|
||||
{ lvdisplay_columns_CMD, lvdisplay_columns_cmd },
|
||||
{ lvdisplay_colon_CMD, lvdisplay_colon_cmd },
|
||||
|
||||
/* pvdisplay variants */
|
||||
{ pvdisplay_columns_CMD, pvdisplay_columns_cmd },
|
||||
{ pvdisplay_colon_CMD, pvdisplay_colon_cmd },
|
||||
|
||||
/* vgdisplay variants */
|
||||
{ vgdisplay_columns_CMD, vgdisplay_columns_cmd },
|
||||
{ vgdisplay_colon_CMD, vgdisplay_colon_cmd },
|
||||
|
||||
/* lvconvert utilities related to repair. */
|
||||
{ lvconvert_repair_CMD, lvconvert_repair_cmd },
|
||||
{ lvconvert_replace_pv_CMD, lvconvert_replace_pv_cmd },
|
||||
|
@ -106,3 +106,13 @@ int pvdisplay(struct cmd_context *cmd, int argc, char **argv)
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int pvdisplay_columns_cmd(struct cmd_context *cmd, int argc, char **argv)
|
||||
{
|
||||
return pvdisplay(cmd, argc, argv);
|
||||
}
|
||||
|
||||
int pvdisplay_colon_cmd(struct cmd_context *cmd, int argc, char **argv)
|
||||
{
|
||||
return pvdisplay(cmd, argc, argv);
|
||||
}
|
||||
|
@ -188,6 +188,13 @@ int lvchange_rebuild_cmd(struct cmd_context *cmd, int argc, char **argv);
|
||||
int lvchange_monitor_poll_cmd(struct cmd_context *cmd, int argc, char **argv);
|
||||
int lvchange_persistent_cmd(struct cmd_context *cmd, int argc, char **argv);
|
||||
|
||||
int lvdisplay_columns_cmd(struct cmd_context *cmd, int argc, char **argv);
|
||||
int lvdisplay_colon_cmd(struct cmd_context *cmd, int argc, char **argv);
|
||||
int pvdisplay_columns_cmd(struct cmd_context *cmd, int argc, char **argv);
|
||||
int pvdisplay_colon_cmd(struct cmd_context *cmd, int argc, char **argv);
|
||||
int vgdisplay_columns_cmd(struct cmd_context *cmd, int argc, char **argv);
|
||||
int vgdisplay_colon_cmd(struct cmd_context *cmd, int argc, char **argv);
|
||||
|
||||
int lvconvert_repair_cmd(struct cmd_context *cmd, int argc, char **argv);
|
||||
int lvconvert_replace_pv_cmd(struct cmd_context *cmd, int argc, char **argv);
|
||||
|
||||
|
@ -107,3 +107,13 @@ int vgdisplay(struct cmd_context *cmd, int argc, char **argv)
|
||||
}
|
||||
************/
|
||||
}
|
||||
|
||||
int vgdisplay_columns_cmd(struct cmd_context *cmd, int argc, char **argv)
|
||||
{
|
||||
return vgdisplay(cmd, argc, argv);
|
||||
}
|
||||
|
||||
int vgdisplay_colon_cmd(struct cmd_context *cmd, int argc, char **argv)
|
||||
{
|
||||
return vgdisplay(cmd, argc, argv);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user