]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-fs: Remove fs_legacy_init()
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Thu, 24 Aug 2023 22:12:48 +0000 (18:12 -0400)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Fri, 17 Jan 2025 08:40:01 +0000 (10:40 +0200)
src/lib-fs/fs-api-private.h
src/lib-fs/fs-api.c
src/lib-fs/fs-api.h

index e00ebb267ee13eb6b1bd73ac62c80740bb513611..fee490ce0d9ef9fed5604cb8209203159902f789 100644 (file)
@@ -29,9 +29,6 @@ struct fs_vfuncs {
        struct fs *(*alloc)(void);
        int (*init)(struct fs *fs, const struct fs_parameters *params,
                    const char **error_r);
-       int (*legacy_init)(struct fs *fs, const char *args,
-                          const struct fs_parameters *params,
-                          const char **error_r);
        void (*deinit)(struct fs *fs);
        void (*free)(struct fs *fs);
 
index 844bd7b2e5232932b537b1eaa933c18a6a2bc818..dd6b67012d9783b6a4b3522b65f6efcf089ced17 100644 (file)
@@ -184,33 +184,6 @@ fs_alloc(const char *driver, struct event *event_parent,
        return 0;
 }
 
-int fs_legacy_init(const char *driver, const char *args,
-                  struct event *event_parent,
-                  const struct fs_parameters *params,
-                  struct fs **fs_r, const char **error_r)
-{
-       struct fs *fs;
-       const char *error;
-       int ret;
-
-       if (fs_alloc(driver, event_parent, params, &fs, error_r) < 0)
-               return -1;
-
-       if (fs->v.legacy_init == NULL) {
-               error = "legacy_init() not supported";
-               ret = -1;
-       } else T_BEGIN {
-               ret = fs->v.legacy_init(fs, args, params, &error);
-       } T_END_PASS_STR_IF(ret < 0, &error);
-       if (ret < 0) {
-               *error_r = t_strdup_printf("%s: %s", fs->name, error);
-               fs_unref(&fs);
-               return -1;
-       }
-       *fs_r = fs;
-       return 0;
-}
-
 static bool fs_settings_check(void *_set, pool_t pool ATTR_UNUSED,
                              const char **error_r ATTR_UNUSED)
 {
index 9aebe99a917f8eb2a5ff3c7ca41ce924bdca3c74..0db4384685309bab7311604b35a2c97631f8acf3 100644 (file)
@@ -212,11 +212,6 @@ typedef void fs_file_async_callback_t(void *context);
    lookup or driver initialization failed. */
 int fs_init_auto(struct event *event, const struct fs_parameters *params,
                 struct fs **fs_r, const char **error_r);
-/* event_parent can be overridden by fs_file_init_with_event() */
-int fs_legacy_init(const char *driver, const char *args,
-                  struct event *event_parent,
-                  const struct fs_parameters *params,
-                  struct fs **fs_r, const char **error_r);
 /* same as fs_unref() */
 void fs_deinit(struct fs **fs);