]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-fs: Remove event_parent parameter from fs_vfuncs.init()
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Fri, 28 Jul 2023 09:49:50 +0000 (12:49 +0300)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Wed, 12 Feb 2025 10:34:10 +0000 (12:34 +0200)
fs->event should be used instead.

src/lib-fs/fs-api-private.h
src/lib-fs/fs-api.c
src/lib-fs/fs-dict.c
src/lib-fs/fs-metawrap.c
src/lib-fs/fs-posix.c
src/lib-fs/fs-randomfail.c
src/lib-fs/fs-sis-queue.c
src/lib-fs/fs-sis.c
src/lib-fs/fs-test.c
src/plugins/fs-compress/fs-compress.c
src/plugins/mail-crypt/fs-crypt-common.c

index add6c9a4a81eab5bdabe22c5fe4e1fa47d8bb4d7..19343f61a53ddef437a066e1d639a767860072fd 100644 (file)
@@ -28,7 +28,6 @@ extern struct fs_api_module_register fs_api_module_register;
 struct fs_vfuncs {
        struct fs *(*alloc)(void);
        int (*init)(struct fs *fs, const char *args,
-                   struct event *event_parent,
                    const struct fs_parameters *params,
                    const char **error_r);
        void (*deinit)(struct fs *fs);
index 5ad714ff86f5e69c2c9ca9b5ea4d0146d94d8848..71b3b9fae498f197f5a1fe12ba8242587441db15 100644 (file)
@@ -52,7 +52,7 @@ fs_alloc(const struct fs *fs_class, const char *args,
        fs->event = fs_create_event(fs, event_parent);
 
        T_BEGIN {
-               ret = fs_class->v.init(fs, args, event_parent, params, &error);
+               ret = fs_class->v.init(fs, args, params, &error);
        } T_END_PASS_STR_IF(ret < 0, &error);
        if (ret < 0) {
                *error_r = t_strdup_printf("%s: %s", fs_class->name, error);
index e2a2735dd569ffe7b8f1bc93519c979f13f23297..612672cd95acb24ef6bed6b7c5f4c841aa6d2032 100644 (file)
@@ -46,7 +46,7 @@ static struct fs *fs_dict_alloc(void)
 }
 
 static int
-fs_dict_init(struct fs *_fs, const char *args, struct event *event_parent,
+fs_dict_init(struct fs *_fs, const char *args,
             const struct fs_parameters *params, const char **error_r)
 {
        struct dict_fs *fs = (struct dict_fs *)_fs;
@@ -73,7 +73,7 @@ fs_dict_init(struct fs *_fs, const char *args, struct event *event_parent,
 
        i_zero(&dict_set);
        dict_set.base_dir = params->base_dir;
-       dict_set.event_parent = event_parent;
+       dict_set.event_parent = _fs->event;
 
        if (dict_init_legacy(p, &dict_set, &fs->dict, &error) < 0) {
                *error_r = t_strdup_printf("dict_init(%s) failed: %s",
index 2a2a66d0b36ebb5d168b17bd88925c153420b40b..8b2e28e013b4a2dd5bca806c67c6c47b88bb3221 100644 (file)
@@ -47,8 +47,7 @@ static struct fs *fs_metawrap_alloc(void)
 
 static int
 fs_metawrap_init(struct fs *_fs, const char *args,
-                struct event *event_parent, const struct fs_parameters *params,
-                const char **error_r)
+                const struct fs_parameters *params, const char **error_r)
 {
        struct metawrap_fs *fs = METAWRAP_FS(_fs);
        const char *parent_name, *parent_args;
@@ -66,7 +65,7 @@ fs_metawrap_init(struct fs *_fs, const char *args,
                parent_name = t_strdup_until(args, parent_args);
                parent_args++;
        }
-       if (fs_init(parent_name, parent_args, event_parent, params,
+       if (fs_init(parent_name, parent_args, _fs->event, params,
                    &_fs->parent, error_r) < 0)
                return -1;
        if ((fs_get_properties(_fs->parent) & FS_PROPERTY_METADATA) == 0)
index 0cfe01f6172abc31f36cc206209f157174432444..93b0954ce3aec3f353b2c3424ae2ac53ccb598b0 100644 (file)
@@ -77,7 +77,6 @@ static struct fs *fs_posix_alloc(void)
 
 static int
 fs_posix_init(struct fs *_fs, const char *args,
-             struct event *event_parent ATTR_UNUSED,
              const struct fs_parameters *params, const char **error_r)
 {
        struct posix_fs *fs = container_of(_fs, struct posix_fs, fs);
index 16a9e9b5e7eb4b2be0e7574eb9dd4745765cc76d..9c7d609ccf5e6bc9b74613a5010d5b7a84a146d6 100644 (file)
@@ -163,7 +163,7 @@ static int fs_randomfail_parse_params(struct randomfail_fs *fs,
 }
 
 static int
-fs_randomfail_init(struct fs *_fs, const char *args, struct event *event_parent,
+fs_randomfail_init(struct fs *_fs, const char *args,
                   const struct fs_parameters *params, const char **error_r)
 {
        struct randomfail_fs *fs = RANDOMFAIL_FS(_fs);
@@ -194,7 +194,7 @@ fs_randomfail_init(struct fs *_fs, const char *args, struct event *event_parent,
                parent_name = t_strdup_until(args, parent_args);
                parent_args++;
        }
-       if (fs_init(parent_name, parent_args, event_parent, params,
+       if (fs_init(parent_name, parent_args, _fs->event, params,
                    &_fs->parent, error_r) < 0)
                return -1;
        return 0;
index 27f9108c0a8bbc8c856cc9bde6760452d3239ce5..d483ad138c1cc839ca8b6b59051d8831259210db 100644 (file)
@@ -29,7 +29,7 @@ static struct fs *fs_sis_queue_alloc(void)
 }
 
 static int
-fs_sis_queue_init(struct fs *_fs, const char *args, struct event *event_parent,
+fs_sis_queue_init(struct fs *_fs, const char *args,
                  const struct fs_parameters *params, const char **error_r)
 {
        struct sis_queue_fs *fs = SISQUEUE_FS(_fs);
@@ -51,7 +51,7 @@ fs_sis_queue_init(struct fs *_fs, const char *args, struct event *event_parent,
                parent_args = "";
        else
                parent_name = t_strdup_until(parent_name, parent_args++);
-       if (fs_init(parent_name, parent_args, event_parent, params,
+       if (fs_init(parent_name, parent_args, _fs->event, params,
                    &_fs->parent, error_r) < 0)
                return -1;
        return 0;
index fc59b25d2bda3481856c0f44bb65f4979afd0514..8af9556a3df8b731d6ea5c2c951be7d1a4269bfb 100644 (file)
@@ -41,7 +41,7 @@ static struct fs *fs_sis_alloc(void)
 }
 
 static int
-fs_sis_init(struct fs *_fs, const char *args, struct event *event_parent,
+fs_sis_init(struct fs *_fs, const char *args,
            const struct fs_parameters *params, const char **error_r)
 {
        enum fs_properties props;
@@ -60,7 +60,7 @@ fs_sis_init(struct fs *_fs, const char *args, struct event *event_parent,
                parent_name = t_strdup_until(args, parent_args);
                parent_args++;
        }
-       if (fs_init(parent_name, parent_args, event_parent, params,
+       if (fs_init(parent_name, parent_args, _fs->event, params,
                    &_fs->parent, error_r) < 0)
                return -1;
        props = fs_get_properties(_fs->parent);
index ba215b6bb3c8b919f81e4da7c934b78ec7b17a97..262497b1c4c3e7fcc68eafc9ef238275f65d13cc 100644 (file)
@@ -18,7 +18,6 @@ static struct fs *fs_test_alloc(void)
 
 static int
 fs_test_init(struct fs *_fs ATTR_UNUSED, const char *args ATTR_UNUSED,
-            struct event *event_parent ATTR_UNUSED,
             const struct fs_parameters *params ATTR_UNUSED,
             const char **error_r ATTR_UNUSED)
 {
index 20d41eac2da0aae6e66bf99ddf7b79a65616be31..228b3736148a6cdf3c8b0c3d4e60618064431140 100644 (file)
@@ -46,7 +46,7 @@ static struct fs *fs_compress_alloc(void)
 
 static int
 fs_compress_init(struct fs *_fs, const char *args,
-                struct event *event_parent, const struct fs_parameters *params,
+                const struct fs_parameters *params,
                 const char **error_r)
 {
        struct compress_fs *fs = COMPRESS_FS(_fs);
@@ -100,7 +100,7 @@ fs_compress_init(struct fs *_fs, const char *args,
                parent_name = t_strdup_until(args, parent_args);
                parent_args++;
        }
-       return fs_init(parent_name, parent_args, event_parent, params,
+       return fs_init(parent_name, parent_args, _fs->event, params,
                       &_fs->parent, error_r);
 }
 
index a19521829ce183f85520c060cc120fb05903f282..2001fa901d2098412c175c8181619c141969a213 100644 (file)
@@ -62,7 +62,7 @@ static struct fs *fs_crypt_alloc(void)
 }
 
 static int
-fs_crypt_init(struct fs *_fs, const char *args, struct event *event_parent,
+fs_crypt_init(struct fs *_fs, const char *args,
              const struct fs_parameters *params, const char **error_r)
 {
        struct crypt_fs *fs = CRYPT_FS(_fs);
@@ -116,7 +116,7 @@ fs_crypt_init(struct fs *_fs, const char *args, struct event *event_parent,
                parent_name = t_strdup_until(args, parent_args);
                parent_args++;
        }
-       if (fs_init(parent_name, parent_args, event_parent, params,
+       if (fs_init(parent_name, parent_args, _fs->event, params,
                    &_fs->parent, error_r) < 0)
                return -1;
        fs->enc_algo = i_strdup(enc_algo);