From: Timo Sirainen Date: Fri, 22 Nov 2024 10:41:06 +0000 (+0200) Subject: lib-settings, config: Rename SET_BOOLLIST_* to SET_LIST_* X-Git-Tag: 2.4.1~505 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1c9315da446730b8337128308e02470924833d0f;p=thirdparty%2Fdovecot%2Fcore.git lib-settings, config: Rename SET_BOOLLIST_* to SET_LIST_* This is in preparation for STRLIST to use them as well. --- diff --git a/src/config/config-dump-full.c b/src/config/config-dump-full.c index b81850dad6..005222b911 100644 --- a/src/config/config-dump-full.c +++ b/src/config/config-dump-full.c @@ -379,8 +379,8 @@ static void config_dump_full_callback(const struct config_export_setting *set, suffix = settings_section_escape(suffix + 1); o_stream_nsend(ctx->output, set->value_stop_list ? - SET_BOOLLIST_REPLACE : - SET_BOOLLIST_APPEND, 1); + SET_LIST_REPLACE : + SET_LIST_APPEND, 1); o_stream_nsend(ctx->output, suffix, strlen(suffix) + 1); } else { @@ -388,7 +388,7 @@ static void config_dump_full_callback(const struct config_export_setting *set, i_assert(suffix[0] == '\0'); i_assert(set->type == CONFIG_KEY_LIST); o_stream_nsend(ctx->output, - SET_BOOLLIST_CLEAR, 1 + 1); + SET_LIST_CLEAR, 1 + 1); } } o_stream_nsend(ctx->output, set->value, strlen(set->value)+1); diff --git a/src/lib-settings/settings-parser.h b/src/lib-settings/settings-parser.h index 665d6d3396..a84394b961 100644 --- a/src/lib-settings/settings-parser.h +++ b/src/lib-settings/settings-parser.h @@ -19,9 +19,9 @@ struct var_expand_provider; #define SET_TIME_INFINITE UINT_MAX #define SET_TIME_MSECS_INFINITE UINT_MAX -#define SET_BOOLLIST_APPEND "+" -#define SET_BOOLLIST_REPLACE "$" -#define SET_BOOLLIST_CLEAR "." +#define SET_LIST_APPEND "+" +#define SET_LIST_REPLACE "$" +#define SET_LIST_CLEAR "." #define SET_FILE_INLINE_PREFIX "inline:" diff --git a/src/lib-settings/settings.c b/src/lib-settings/settings.c index 3b61bfcdf5..02eec62845 100644 --- a/src/lib-settings/settings.c +++ b/src/lib-settings/settings.c @@ -707,12 +707,12 @@ settings_mmap_apply_blob(struct settings_apply_ctx *ctx, ctx->info->defines[key_idx].type == SET_STRLIST) { const char *type = (const char *)mmap->mmap_base + offset; - if (type[0] == SET_BOOLLIST_REPLACE[0]) + if (type[0] == SET_LIST_REPLACE[0]) list_stop = TRUE; - else if (type[0] == SET_BOOLLIST_CLEAR[0]) { + else if (type[0] == SET_LIST_CLEAR[0]) { list_stop = TRUE; list_clear = TRUE; - } else if (type[0] != SET_BOOLLIST_APPEND[0]) { + } else if (type[0] != SET_LIST_APPEND[0]) { *error_r = t_strdup_printf( "List type is invalid (offset=%zu)", offset);