From: Timo Sirainen Date: Sun, 18 Dec 2022 22:08:47 +0000 (+0200) Subject: config: config_export_init() - Remove unused exclude_settings parameter X-Git-Tag: 2.4.0~3080 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bd72e34339a35e681d10e9b40370aa699f7e0bf2;p=thirdparty%2Fdovecot%2Fcore.git config: config_export_init() - Remove unused exclude_settings parameter --- diff --git a/src/config/config-dump-full.c b/src/config/config-dump-full.c index afda098c36..84ba2a7655 100644 --- a/src/config/config-dump-full.c +++ b/src/config/config-dump-full.c @@ -91,7 +91,7 @@ config_dump_full_sections(struct ostream *output, unsigned int section_idx) for (; *filters != NULL && ret == 0; filters++) T_BEGIN { config_dump_full_write_filter(output, &(*filters)->filter); - export_ctx = config_export_init(NULL, NULL, + export_ctx = config_export_init(NULL, CONFIG_DUMP_SCOPE_SET, CONFIG_DUMP_FLAG_HIDE_LIST_DEFAULTS, config_dump_full_callback, &dump_ctx); @@ -118,7 +118,7 @@ int config_dump_full(struct ostream *output, const char **import_environment_r) }; flags = CONFIG_DUMP_FLAG_CHECK_SETTINGS; - export_ctx = config_export_init(NULL, NULL, + export_ctx = config_export_init(NULL, CONFIG_DUMP_SCOPE_CHANGED, flags, config_dump_full_callback, &dump_ctx); i_zero(&empty_filter); diff --git a/src/config/config-request.c b/src/config/config-request.c index 28ffacd6be..a8a99e2de5 100644 --- a/src/config/config-request.c +++ b/src/config/config-request.c @@ -23,7 +23,6 @@ struct config_export_context { void *context; const char *const *modules; - const char *const *exclude_settings; enum config_dump_flags flags; const struct config_module_parser *parsers; struct config_module_parser *dup_parsers; @@ -229,10 +228,6 @@ settings_export(struct config_export_context *ctx, bool dump, dump_default = FALSE; for (def = info->defines; def->key != NULL; def++) { - if (ctx->exclude_settings != NULL && - str_array_find(ctx->exclude_settings, def->key)) - continue; - value = CONST_PTR_OFFSET(set, def->offset); default_value = info->defaults == NULL ? NULL : CONST_PTR_OFFSET(info->defaults, def->offset); @@ -384,7 +379,6 @@ settings_export(struct config_export_context *ctx, struct config_export_context * config_export_init(const char *const *modules, - const char *const *exclude_settings, enum config_dump_scope scope, enum config_dump_flags flags, config_request_callback_t *callback, void *context) @@ -397,8 +391,6 @@ config_export_init(const char *const *modules, ctx->pool = pool; ctx->modules = modules == NULL ? NULL : p_strarray_dup(pool, modules); - ctx->exclude_settings = exclude_settings == NULL ? NULL : - p_strarray_dup(pool, exclude_settings); ctx->flags = flags; ctx->callback = callback; ctx->context = context; diff --git a/src/config/config-request.h b/src/config/config-request.h index f0fb8f6b6d..15ff578ca3 100644 --- a/src/config/config-request.h +++ b/src/config/config-request.h @@ -41,7 +41,6 @@ bool config_export_type(string_t *str, const void *value, bool *dump_r) ATTR_NULL(3); struct config_export_context * config_export_init(const char *const *modules, - const char *const *exclude_settings, enum config_dump_scope scope, enum config_dump_flags flags, config_request_callback_t *callback, void *context) diff --git a/src/config/doveconf.c b/src/config/doveconf.c index e55b54eafb..3778e1790f 100644 --- a/src/config/doveconf.c +++ b/src/config/doveconf.c @@ -154,7 +154,7 @@ config_dump_human_init(const char *const *modules, enum config_dump_scope scope, CONFIG_DUMP_FLAG_CALLBACK_ERRORS; if (check_settings) flags |= CONFIG_DUMP_FLAG_CHECK_SETTINGS; - ctx->export_ctx = config_export_init(modules, NULL, scope, flags, + ctx->export_ctx = config_export_init(modules, scope, flags, config_request_get_strings, ctx); return ctx; } @@ -1041,7 +1041,7 @@ int main(int argc, char *argv[]) struct config_export_context *ctx; unsigned int section_idx = 0; - ctx = config_export_init(wanted_modules, NULL, scope, + ctx = config_export_init(wanted_modules, scope, CONFIG_DUMP_FLAG_CHECK_SETTINGS, config_request_simple_stdout, setting_name_filters); @@ -1076,7 +1076,7 @@ int main(int argc, char *argv[]) struct config_export_context *ctx; unsigned int section_idx = 0; - ctx = config_export_init(wanted_modules, NULL, CONFIG_DUMP_SCOPE_SET, + ctx = config_export_init(wanted_modules, CONFIG_DUMP_SCOPE_SET, CONFIG_DUMP_FLAG_CHECK_SETTINGS, config_request_putenv, NULL); config_export_by_filter(ctx, &filter);