}
static struct config_dump_human_context *
-config_dump_human_init(enum config_dump_scope scope)
+config_dump_human_init(enum config_dump_scope scope,
+ struct config_filter_parser *filter_parser)
{
struct config_dump_human_context *ctx;
enum config_dump_flags flags;
flags = CONFIG_DUMP_FLAG_DEDUPLICATE_KEYS;
ctx->export_ctx = config_export_init(scope, flags,
config_request_get_strings, ctx);
+ config_export_set_module_parsers(ctx->export_ctx,
+ filter_parser->module_parsers);
return ctx;
}
bool sub_hide_passwords = set_name_filter != NULL ?
FALSE : hide_passwords;
- ctx = config_dump_human_init(scope);
+ ctx = config_dump_human_init(scope, filter_parser);
sub_indent = hide_key ? 0 :
config_dump_filter_begin(list_prefix, indent,
&filter_parser->filter);
- config_export_set_module_parsers(ctx->export_ctx,
- filter_parser->module_parsers);
str_append_str(ctx->list_prefix, list_prefix);
const char *filter_key =
!filter_parser->filter.filter_name_array ? NULL :
/* Check for the setting always even with a filter - it might be
e.g. plugin/key strlist */
- ctx = config_dump_human_init(scope);
- config_export_set_module_parsers(ctx->export_ctx,
- filter_parser->module_parsers);
+ ctx = config_dump_human_init(scope, filter_parser);
config_dump_human_output(ctx, output, 0, setting_name_filter, NULL,
hide_key, hide_passwords, NULL);
config_dump_human_deinit(ctx);