From: Timo Sirainen Date: Thu, 24 Aug 2023 22:12:48 +0000 (-0400) Subject: lib-fs: Remove fs_legacy_init() X-Git-Tag: 2.4.0~106 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4754e9b87e039a3bb9fc6259346ff4c4aba0129e;p=thirdparty%2Fdovecot%2Fcore.git lib-fs: Remove fs_legacy_init() --- diff --git a/src/lib-fs/fs-api-private.h b/src/lib-fs/fs-api-private.h index e00ebb267e..fee490ce0d 100644 --- a/src/lib-fs/fs-api-private.h +++ b/src/lib-fs/fs-api-private.h @@ -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); diff --git a/src/lib-fs/fs-api.c b/src/lib-fs/fs-api.c index 844bd7b2e5..dd6b67012d 100644 --- a/src/lib-fs/fs-api.c +++ b/src/lib-fs/fs-api.c @@ -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) { diff --git a/src/lib-fs/fs-api.h b/src/lib-fs/fs-api.h index 9aebe99a91..0db4384685 100644 --- a/src/lib-fs/fs-api.h +++ b/src/lib-fs/fs-api.h @@ -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);