diff options
author | Peter Rajnoha <prajnoha@redhat.com> | 2015-08-21 14:01:06 +0200 |
---|---|---|
committer | Peter Rajnoha <prajnoha@redhat.com> | 2016-02-19 14:40:23 +0100 |
commit | 0e75b9ae13683c784956a8f5bdb9e8ed5318f3d2 (patch) | |
tree | 1279bd614fc4d1d6c508798af6c7088e76e2cb8a | |
parent | 32f0c141359b4c567cbf5bf37d51fd229bd73b73 (diff) | |
download | lvm2-0e75b9ae13683c784956a8f5bdb9e8ed5318f3d2.tar.gz |
cmd: add 'nohistory' option and wire it up in cmd_context
The --nohistory switch will cause former LVs to not be recorded
in metadata on demand.
-rw-r--r-- | lib/commands/toolcontext.h | 1 | ||||
-rw-r--r-- | tools/args.h | 1 | ||||
-rw-r--r-- | tools/lvmcmdline.c | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/lib/commands/toolcontext.h b/lib/commands/toolcontext.h index 532cba7d1..23328df55 100644 --- a/lib/commands/toolcontext.h +++ b/lib/commands/toolcontext.h @@ -128,6 +128,7 @@ struct cmd_context { unsigned threaded:1; /* set if running within a thread e.g. clvmd */ unsigned independent_metadata_areas:1; /* active formats have MDAs outside PVs */ unsigned unknown_system_id:1; + unsigned record_former_entities:1; /* record former entities */ unsigned include_former_entities:1; /* also process/report/display former entities */ unsigned include_foreign_vgs:1; /* report/display cmds can reveal foreign VGs */ unsigned include_shared_vgs:1; /* report/display cmds can reveal lockd VGs */ diff --git a/tools/args.h b/tools/args.h index 9ebd99d23..0b9f625a0 100644 --- a/tools/args.h +++ b/tools/args.h @@ -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) diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c index 6ee2704d5..c89fba306 100644 --- a/tools/lvmcmdline.c +++ b/tools/lvmcmdline.c @@ -1101,6 +1101,7 @@ static int _get_settings(struct cmd_context *cmd) cmd->ignore_clustered_vgs = arg_is_set(cmd, ignoreskippedcluster_ARG); 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->record_former_entities = arg_is_set(cmd, nohistory_ARG) ? 0 : 1; cmd->include_former_entities = arg_is_set(cmd, removed_ARG) ? 1 : 0; /* |