mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
cmd: add 'nohistory' option and wire it up in cmd_context
The --nohistory switch will cause historical LVs to not be recorded in metadata on demand.
This commit is contained in:
parent
8f47119f6f
commit
9a34de9cb9
@ -129,6 +129,7 @@ struct cmd_context {
|
||||
unsigned independent_metadata_areas:1; /* active formats have MDAs outside PVs */
|
||||
unsigned unknown_system_id:1;
|
||||
unsigned include_historical_lvs:1; /* also process/report/display historical LVs */
|
||||
unsigned record_historical_lvs:1; /* record historical LVs */
|
||||
unsigned include_foreign_vgs:1; /* report/display cmds can reveal foreign VGs */
|
||||
unsigned include_shared_vgs:1; /* report/display cmds can reveal lockd VGs */
|
||||
unsigned include_active_foreign_vgs:1; /* cmd should process foreign VGs with active LVs */
|
||||
|
@ -69,6 +69,7 @@ arg(mknodes_ARG, '\0', "mknodes", NULL, 0)
|
||||
arg(monitor_ARG, '\0', "monitor", yes_no_arg, 0)
|
||||
arg(nameprefixes_ARG, '\0', "nameprefixes", NULL, 0)
|
||||
arg(noheadings_ARG, '\0', "noheadings", NULL, 0)
|
||||
arg(nohistory_ARG, '\0', "nohistory", NULL, 0)
|
||||
arg(nolocking_ARG, '\0', "nolocking", NULL, 0)
|
||||
arg(norestorefile_ARG, '\0', "norestorefile", NULL, 0)
|
||||
arg(nosuffix_ARG, '\0', "nosuffix", NULL, 0)
|
||||
|
@ -1102,6 +1102,8 @@ static int _get_settings(struct cmd_context *cmd)
|
||||
cmd->include_foreign_vgs = arg_is_set(cmd, foreign_ARG) ? 1 : 0;
|
||||
cmd->include_shared_vgs = arg_is_set(cmd, shared_ARG) ? 1 : 0;
|
||||
cmd->include_historical_lvs = arg_is_set(cmd, history_ARG) ? 1 : 0;
|
||||
cmd->include_historical_lvs = arg_is_set(cmd, history_ARG) ? 1 : 0;
|
||||
cmd->record_historical_lvs = arg_is_set(cmd, nohistory_ARG) ? 0 : 1;
|
||||
|
||||
/*
|
||||
* This is set to zero by process_each which wants to print errors
|
||||
|
Loading…
Reference in New Issue
Block a user