summaryrefslogtreecommitdiff
path: root/lib/commands/toolcontext.c
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2016-05-16 14:35:43 -0500
committerDavid Teigland <teigland@redhat.com>2016-05-25 11:50:00 -0500
commitaef9cb905835f9482707742780de029131659722 (patch)
tree29fdb7f2d1ad05e5e3a8be30181f7d6bb3668f85 /lib/commands/toolcontext.c
parent7fffcce9247cba8ecb40a1c7b0c6d18a5cde2165 (diff)
downloadlvm2-dev-dct-vgimportclone-2.tar.gz
pvchange: add importclone optiondev-dct-vgimportclone-2
This is a native implementation of vgimportclone. pvchange --importclone PVs All cloned PVs from the VG must be imported together and named as args.
Diffstat (limited to 'lib/commands/toolcontext.c')
-rw-r--r--lib/commands/toolcontext.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/commands/toolcontext.c b/lib/commands/toolcontext.c
index 1e3f14a79..2df73c145 100644
--- a/lib/commands/toolcontext.c
+++ b/lib/commands/toolcontext.c
@@ -1053,7 +1053,7 @@ static int _init_dev_cache(struct cmd_context *cmd)
return 1;
}
-#define MAX_FILTERS 8
+#define MAX_FILTERS 9
static struct dev_filter *_init_lvmetad_filter_chain(struct cmd_context *cmd)
{
@@ -1078,6 +1078,13 @@ static struct dev_filter *_init_lvmetad_filter_chain(struct cmd_context *cmd)
nr_filt++;
}
+ /* internal filter used by command processing. */
+ if (!(filters[nr_filt] = internal_filter_create())) {
+ log_error("Failed to create internal device filter");
+ goto bad;
+ }
+ nr_filt++;
+
/* global regex filter. Optional. */
if ((cn = find_config_tree_node(cmd, devices_global_filter_CFG, NULL))) {
if (!(filters[nr_filt] = regex_filter_create(cn->v))) {