From f54198eed62f915df6fdb7c09a186160b5bb3954 Mon Sep 17 00:00:00 2001 From: Peter Rajnoha Date: Fri, 31 Jul 2015 10:20:33 +0200 Subject: [PATCH] toolcontext: use refresh_filters in refresh_toolcontext Use refresh_filters instead of destroy_filters and init_filters in refresh_toolcontext fn which deals with cmd->initialized.filters correctly on refresh. --- lib/commands/toolcontext.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/commands/toolcontext.c b/lib/commands/toolcontext.c index c087820f9..f4c0c9507 100644 --- a/lib/commands/toolcontext.c +++ b/lib/commands/toolcontext.c @@ -2011,7 +2011,6 @@ int refresh_toolcontext(struct cmd_context *cmd) label_exit(); _destroy_segtypes(&cmd->segtypes); _destroy_formats(cmd, &cmd->formats); - _destroy_filters(cmd); if (!dev_cache_exit()) stack; @@ -2109,7 +2108,7 @@ int refresh_toolcontext(struct cmd_context *cmd) if (cmd->initialized.connections && !init_connections(cmd)) return_0; - if (cmd->initialized.filters && !init_filters(cmd, 0)) + if (!refresh_filters(cmd)) return_0; reset_lvm_errno(1); -- 2.43.5