mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-10 16:58:47 +03:00
pvck: show specific dump option values
This commit is contained in:
parent
4a52855899
commit
2da6f01c15
@ -213,7 +213,7 @@ arg(driverloaded_ARG, '\0', "driverloaded", bool_VAL, 0, 0,
|
||||
"If set to no, the command will not attempt to use device-mapper.\n"
|
||||
"For testing and debugging.\n")
|
||||
|
||||
arg(dump_ARG, '\0', "dump", string_VAL, 0, 0,
|
||||
arg(dump_ARG, '\0', "dump", dumptype_VAL, 0, 0,
|
||||
"Dump headers and metadata from a PV for debugging and repair.\n"
|
||||
"Option values include: \\fBheaders\\fP to print and check LVM headers,\n"
|
||||
"\\fBmetadata\\fP to print or save the current text metadata,\n"
|
||||
|
@ -1436,7 +1436,7 @@ OO: --labelsector Number
|
||||
ID: pvck_general
|
||||
DESC: Check for metadata on a device
|
||||
|
||||
pvck --dump String PV
|
||||
pvck --dump DumpType PV
|
||||
OO: --settings String, --file String,
|
||||
--pvmetadatacopies MetadataCopiesPV, --labelsector Number
|
||||
ID: pvck_dump
|
||||
|
@ -123,6 +123,7 @@ static inline int reportformat_arg(struct cmd_context *cmd __attribute__((unused
|
||||
static inline int configreport_arg(struct cmd_context *cmd __attribute__((unused)), struct arg_values *av) { return 0; }
|
||||
static inline int configtype_arg(struct cmd_context *cmd __attribute__((unused)), struct arg_values *av) { return 0; }
|
||||
static inline int repairtype_arg(struct cmd_context *cmd __attribute__((unused)), struct arg_values *av) { return 0; }
|
||||
static inline int dumptype_arg(struct cmd_context *cmd __attribute__((unused)), struct arg_values *av) { return 0; }
|
||||
|
||||
/* needed to include commands.h when building man page generator */
|
||||
#define CACHE_VGMETADATA 0x00000001
|
||||
|
@ -1086,6 +1086,18 @@ int repairtype_arg(struct cmd_context *cmd, struct arg_values *av)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int dumptype_arg(struct cmd_context *cmd, struct arg_values *av)
|
||||
{
|
||||
if (!strcmp(av->value, "headers") ||
|
||||
!strcmp(av->value, "metadata") ||
|
||||
!strcmp(av->value, "metadata_all") ||
|
||||
!strcmp(av->value, "metadata_search") ||
|
||||
!strcmp(av->value, "metadata_area") ||
|
||||
!strcmp(av->value, "backup_to_raw"))
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* FIXME: there's been a confusing mixup among:
|
||||
* resizeable, resizable, allocatable, allocation.
|
||||
|
@ -185,6 +185,7 @@ int reportformat_arg(struct cmd_context *cmd __attribute__((unused)), struct arg
|
||||
int configreport_arg(struct cmd_context *cmd __attribute__((unused)), struct arg_values *av);
|
||||
int configtype_arg(struct cmd_context *cmd __attribute__((unused)), struct arg_values *av);
|
||||
int repairtype_arg(struct cmd_context *cmd __attribute__((unused)), struct arg_values *av);
|
||||
int dumptype_arg(struct cmd_context *cmd __attribute__((unused)), struct arg_values *av);
|
||||
|
||||
/* we use the enums to access the switches */
|
||||
unsigned arg_count(const struct cmd_context *cmd, int a);
|
||||
|
@ -142,6 +142,7 @@ val(reportformat_VAL, reportformat_arg, "ReportFmt", "basic|json")
|
||||
val(configreport_VAL, configreport_arg, "ConfigReport", "log|vg|lv|pv|pvseg|seg")
|
||||
val(configtype_VAL, configtype_arg, "ConfigType", "current|default|diff|full|list|missing|new|profilable|profilable-command|profilable-metadata")
|
||||
val(repairtype_VAL, repairtype_arg, "RepairType", "pv_header|metadata|label_header")
|
||||
val(dumptype_VAL, dumptype_arg, "DumpType", "headers|metadata|metadata_all|metadata_search")
|
||||
|
||||
/* this should always be last */
|
||||
val(VAL_COUNT, NULL, NULL, NULL)
|
||||
|
Loading…
x
Reference in New Issue
Block a user