]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-settings: Remove unused settings_parse_file()
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Tue, 29 Nov 2022 17:21:59 +0000 (19:21 +0200)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Fri, 27 Jan 2023 13:01:47 +0000 (13:01 +0000)
src/lib-settings/settings-parser.c
src/lib-settings/settings-parser.h

index cb7829a6bc8f77ea3e036246b0a4e4aba75f1437..dc270c10ebd1f3e084dc953a3493bbb3655f0eb3 100644 (file)
@@ -914,27 +914,6 @@ int settings_parse_stream_read(struct setting_parser_context *ctx,
        return -1;
 }
 
-int settings_parse_file(struct setting_parser_context *ctx,
-                       const char *path, size_t max_line_length)
-{
-       struct istream *input;
-       int fd, ret;
-
-       fd = open(path, O_RDONLY);
-       if (fd < 0) {
-               ctx->error = p_strdup_printf(ctx->parser_pool,
-                                            "open(%s) failed: %m", path);
-               return -1;
-       }
-
-       input = i_stream_create_fd_autoclose(&fd, max_line_length);
-       i_stream_set_name(input, path);
-       ret = settings_parse_stream_read(ctx, input);
-       i_stream_unref(&input);
-
-       return ret;
-}
-
 static int environ_cmp(char *const *s1, char *const *s2)
 {
        return -strcmp(*s1, *s2);
index 405c5fcfdff9f9bd64091da37ddb9232a62d1f91..23720dacc9d463d07e4cd4a773b9409c323f7878 100644 (file)
@@ -184,9 +184,6 @@ int settings_parse_stream(struct setting_parser_context *ctx,
    0 = done, 1 = not finished yet (stream is non-blocking) */
 int settings_parse_stream_read(struct setting_parser_context *ctx,
                               struct istream *input);
-/* Open file and parse it. */
-int settings_parse_file(struct setting_parser_context *ctx,
-                       const char *path, size_t max_line_length);
 int settings_parse_environ(struct setting_parser_context *ctx);
 /* Call all check_func()s to see if currently parsed settings are valid. */
 bool settings_parser_check(struct setting_parser_context *ctx, pool_t pool,