]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
config: Remove unnecessary CONFIG_DUMP_FLAG_IN_SECTION
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Mon, 28 Nov 2022 17:19:11 +0000 (19:19 +0200)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Fri, 27 Jan 2023 13:01:47 +0000 (13:01 +0000)
src/config/config-request.h
src/config/doveconf.c

index c91e836e95877bd63b07b4f913764eb703ef0bfa..29cff2fb21033bb08ab928de2c309ffbfd5d832b 100644 (file)
@@ -22,8 +22,6 @@ enum config_dump_flags {
        CONFIG_DUMP_FLAG_HIDE_LIST_DEFAULTS     = 0x02,
        /* Errors are reported using callback and they don't stop handling */
        CONFIG_DUMP_FLAG_CALLBACK_ERRORS        = 0x04,
-       /* Set if dumping a section and not top level config */
-       CONFIG_DUMP_FLAG_IN_SECTION             = 0x08,
 };
 
 enum config_key_type {
index f100f9a5f146ee744beba1e1453abd16ba60c5b9..246c572dff91aa46af8fc52f0b951dabb989fa5a 100644 (file)
@@ -135,7 +135,7 @@ static void prefix_stack_reset_str(ARRAY_TYPE(prefix_stack) *stack)
 
 static struct config_dump_human_context *
 config_dump_human_init(const char *const *modules, enum config_dump_scope scope,
-                      bool check_settings, bool in_section)
+                      bool check_settings)
 {
        struct config_dump_human_context *ctx;
        enum config_dump_flags flags;
@@ -152,8 +152,6 @@ 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;
-       if (in_section)
-               flags |= CONFIG_DUMP_FLAG_IN_SECTION;
        ctx->export_ctx = config_export_init(modules, NULL, scope, flags,
                                             config_request_get_strings, ctx);
        return ctx;
@@ -570,7 +568,7 @@ config_dump_human_sections(struct ostream *output,
 
        for (; *filters != NULL; filters++) {
                ctx = config_dump_human_init(modules, CONFIG_DUMP_SCOPE_SET,
-                                            FALSE, TRUE);
+                                            FALSE);
                indent = config_dump_filter_begin(ctx->list_prefix,
                                                  &(*filters)->filter);
                config_export_parsers(ctx->export_ctx, (*filters)->parsers);
@@ -596,7 +594,7 @@ config_dump_human(const struct config_filter *filter, const char *const *modules
        o_stream_set_no_error_handling(output, TRUE);
        o_stream_cork(output);
 
-       ctx = config_dump_human_init(modules, scope, TRUE, FALSE);
+       ctx = config_dump_human_init(modules, scope, TRUE);
        config_export_by_filter(ctx->export_ctx, filter);
        ret = config_dump_human_output(ctx, output, 0, setting_name_filter, hide_passwords);
        config_dump_human_deinit(ctx);
@@ -619,7 +617,7 @@ config_dump_one(const struct config_filter *filter, bool hide_key,
        size_t len;
        bool dump_section = FALSE;
 
-       ctx = config_dump_human_init(NULL, scope, FALSE, FALSE);
+       ctx = config_dump_human_init(NULL, scope, FALSE);
        config_export_by_filter(ctx->export_ctx, filter);
        if (config_export_finish(&ctx->export_ctx) < 0)
                return -1;