]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
plugins: Use designated initializers for fs_vfuncs structs
authorMarco Bettini <marco.bettini@open-xchange.com>
Fri, 10 Jun 2022 09:51:16 +0000 (09:51 +0000)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Thu, 6 Oct 2022 18:01:26 +0000 (18:01 +0000)
src/plugins/fs-compress/fs-compress.c
src/plugins/mail-crypt/fs-crypt.c
src/plugins/mail-crypt/fs-mail-crypt.c

index cda1de1698f2808b5a2a980d6fa91ce8ed83ba91..4d82f075a6edf5830a17af60bb17b1f814f6f7b1 100644 (file)
@@ -246,38 +246,38 @@ static int fs_compress_write_stream_finish(struct fs_file *_file, bool success)
 const struct fs fs_class_compress = {
        .name = "compress",
        .v = {
-               fs_compress_alloc,
-               fs_compress_init,
-               NULL,
-               fs_compress_free,
-               fs_wrapper_get_properties,
-               fs_compress_file_alloc,
-               fs_compress_file_init,
-               fs_compress_file_deinit,
-               fs_compress_file_close,
-               fs_wrapper_file_get_path,
-               fs_wrapper_set_async_callback,
-               fs_wrapper_wait_async,
-               fs_wrapper_set_metadata,
-               fs_wrapper_get_metadata,
-               fs_wrapper_prefetch,
-               fs_read_via_stream,
-               fs_compress_read_stream,
-               fs_write_via_stream,
-               fs_compress_write_stream,
-               fs_compress_write_stream_finish,
-               fs_wrapper_lock,
-               fs_wrapper_unlock,
-               fs_wrapper_exists,
-               fs_wrapper_stat,
-               fs_wrapper_copy,
-               fs_wrapper_rename,
-               fs_wrapper_delete,
-               fs_wrapper_iter_alloc,
-               fs_wrapper_iter_init,
-               fs_wrapper_iter_next,
-               fs_wrapper_iter_deinit,
-               NULL,
-               fs_wrapper_get_nlinks
+               .alloc = fs_compress_alloc,
+               .init = fs_compress_init,
+               .deinit = NULL,
+               .free = fs_compress_free,
+               .get_properties = fs_wrapper_get_properties,
+               .file_alloc = fs_compress_file_alloc,
+               .file_init = fs_compress_file_init,
+               .file_deinit = fs_compress_file_deinit,
+               .file_close = fs_compress_file_close,
+               .get_path = fs_wrapper_file_get_path,
+               .set_async_callback = fs_wrapper_set_async_callback,
+               .wait_async = fs_wrapper_wait_async,
+               .set_metadata = fs_wrapper_set_metadata,
+               .get_metadata = fs_wrapper_get_metadata,
+               .prefetch = fs_wrapper_prefetch,
+               .read = fs_read_via_stream,
+               .read_stream = fs_compress_read_stream,
+               .write = fs_write_via_stream,
+               .write_stream = fs_compress_write_stream,
+               .write_stream_finish = fs_compress_write_stream_finish,
+               .lock = fs_wrapper_lock,
+               .unlock = fs_wrapper_unlock,
+               .exists = fs_wrapper_exists,
+               .stat = fs_wrapper_stat,
+               .copy = fs_wrapper_copy,
+               .rename = fs_wrapper_rename,
+               .delete_file = fs_wrapper_delete,
+               .iter_alloc = fs_wrapper_iter_alloc,
+               .iter_init = fs_wrapper_iter_init,
+               .iter_next = fs_wrapper_iter_next,
+               .iter_deinit = fs_wrapper_iter_deinit,
+               .switch_ioloop = NULL,
+               .get_nlinks = fs_wrapper_get_nlinks
        }
 };
index 0a81c696700516579c050b70b3906cced57d1aa4..9220d03438eed6a76c6b2e02e65d26485399c6ad 100644 (file)
@@ -28,38 +28,38 @@ int fs_crypt_load_keys(struct crypt_fs *fs, const char **error_r)
 const struct fs fs_class_crypt = {
        .name = "crypt",
        .v = {
-               fs_crypt_alloc,
-               fs_crypt_init,
-               NULL,
-               fs_crypt_free,
-               fs_wrapper_get_properties,
-               fs_crypt_file_alloc,
-               fs_crypt_file_init,
-               fs_crypt_file_deinit,
-               fs_crypt_file_close,
-               fs_wrapper_file_get_path,
-               fs_wrapper_set_async_callback,
-               fs_wrapper_wait_async,
-               fs_wrapper_set_metadata,
-               fs_wrapper_get_metadata,
-               fs_wrapper_prefetch,
-               fs_read_via_stream,
-               fs_crypt_read_stream,
-               fs_write_via_stream,
-               fs_crypt_write_stream,
-               fs_crypt_write_stream_finish,
-               fs_wrapper_lock,
-               fs_wrapper_unlock,
-               fs_wrapper_exists,
-               fs_wrapper_stat,
-               fs_wrapper_copy,
-               fs_wrapper_rename,
-               fs_wrapper_delete,
-               fs_wrapper_iter_alloc,
-               fs_wrapper_iter_init,
-               fs_wrapper_iter_next,
-               fs_wrapper_iter_deinit,
-               NULL,
-               fs_wrapper_get_nlinks,
+               .alloc = fs_crypt_alloc,
+               .init = fs_crypt_init,
+               .deinit = NULL,
+               .free = fs_crypt_free,
+               .get_properties = fs_wrapper_get_properties,
+               .file_alloc = fs_crypt_file_alloc,
+               .file_init = fs_crypt_file_init,
+               .file_deinit = fs_crypt_file_deinit,
+               .file_close = fs_crypt_file_close,
+               .get_path = fs_wrapper_file_get_path,
+               .set_async_callback = fs_wrapper_set_async_callback,
+               .wait_async = fs_wrapper_wait_async,
+               .set_metadata = fs_wrapper_set_metadata,
+               .get_metadata = fs_wrapper_get_metadata,
+               .prefetch = fs_wrapper_prefetch,
+               .read = fs_read_via_stream,
+               .read_stream = fs_crypt_read_stream,
+               .write = fs_write_via_stream,
+               .write_stream = fs_crypt_write_stream,
+               .write_stream_finish = fs_crypt_write_stream_finish,
+               .lock = fs_wrapper_lock,
+               .unlock = fs_wrapper_unlock,
+               .exists = fs_wrapper_exists,
+               .stat = fs_wrapper_stat,
+               .copy = fs_wrapper_copy,
+               .rename = fs_wrapper_rename,
+               .delete_file = fs_wrapper_delete,
+               .iter_alloc = fs_wrapper_iter_alloc,
+               .iter_init = fs_wrapper_iter_init,
+               .iter_next = fs_wrapper_iter_next,
+               .iter_deinit = fs_wrapper_iter_deinit,
+               .switch_ioloop = NULL,
+               .get_nlinks = fs_wrapper_get_nlinks,
        }
 };
index e1d7fea68aa6b5c358181599a6a938c3dd86197f..62eb165e85d8979e80f0624191bf4d23c09b2264 100644 (file)
@@ -38,38 +38,38 @@ int fs_crypt_load_keys(struct crypt_fs *fs, const char **error_r)
 const struct fs fs_class_mail_crypt = {
        .name = "mail-crypt",
        .v = {
-               fs_crypt_alloc,
-               fs_crypt_init,
-               NULL,
-               fs_crypt_free,
-               fs_wrapper_get_properties,
-               fs_crypt_file_alloc,
-               fs_crypt_file_init,
-               fs_crypt_file_deinit,
-               fs_crypt_file_close,
-               fs_wrapper_file_get_path,
-               fs_wrapper_set_async_callback,
-               fs_wrapper_wait_async,
-               fs_wrapper_set_metadata,
-               fs_wrapper_get_metadata,
-               fs_wrapper_prefetch,
-               fs_read_via_stream,
-               fs_crypt_read_stream,
-               fs_write_via_stream,
-               fs_crypt_write_stream,
-               fs_crypt_write_stream_finish,
-               fs_wrapper_lock,
-               fs_wrapper_unlock,
-               fs_wrapper_exists,
-               fs_wrapper_stat,
-               fs_wrapper_copy,
-               fs_wrapper_rename,
-               fs_wrapper_delete,
-               fs_wrapper_iter_alloc,
-               fs_wrapper_iter_init,
-               fs_wrapper_iter_next,
-               fs_wrapper_iter_deinit,
-               NULL,
-               fs_wrapper_get_nlinks,
+               .alloc = fs_crypt_alloc,
+               .init = fs_crypt_init,
+               .deinit = NULL,
+               .free = fs_crypt_free,
+               .get_properties = fs_wrapper_get_properties,
+               .file_alloc = fs_crypt_file_alloc,
+               .file_init = fs_crypt_file_init,
+               .file_deinit = fs_crypt_file_deinit,
+               .file_close = fs_crypt_file_close,
+               .get_path = fs_wrapper_file_get_path,
+               .set_async_callback = fs_wrapper_set_async_callback,
+               .wait_async = fs_wrapper_wait_async,
+               .set_metadata = fs_wrapper_set_metadata,
+               .get_metadata = fs_wrapper_get_metadata,
+               .prefetch = fs_wrapper_prefetch,
+               .read = fs_read_via_stream,
+               .read_stream = fs_crypt_read_stream,
+               .write = fs_write_via_stream,
+               .write_stream = fs_crypt_write_stream,
+               .write_stream_finish = fs_crypt_write_stream_finish,
+               .lock = fs_wrapper_lock,
+               .unlock = fs_wrapper_unlock,
+               .exists = fs_wrapper_exists,
+               .stat = fs_wrapper_stat,
+               .copy = fs_wrapper_copy,
+               .rename = fs_wrapper_rename,
+               .delete_file = fs_wrapper_delete,
+               .iter_alloc = fs_wrapper_iter_alloc,
+               .iter_init = fs_wrapper_iter_init,
+               .iter_next = fs_wrapper_iter_next,
+               .iter_deinit = fs_wrapper_iter_deinit,
+               .switch_ioloop = NULL,
+               .get_nlinks = fs_wrapper_get_nlinks,
        }
 };