Lines Matching defs:fs
7 #include "fs-test.h"
9 static struct fs *fs_test_alloc(void)
11 struct test_fs *fs;
13 fs = i_new(struct test_fs, 1);
14 fs->fs = fs_class_test;
15 i_array_init(&fs->iter_files, 32);
16 return &fs->fs;
20 fs_test_init(struct fs *_fs ATTR_UNUSED, const char *args ATTR_UNUSED,
26 static void fs_test_deinit(struct fs *_fs)
28 struct test_fs *fs = (struct test_fs *)_fs;
30 array_free(&fs->iter_files);
31 i_free(fs);
34 static enum fs_properties fs_test_get_properties(struct fs *_fs)
36 struct test_fs *fs = (struct test_fs *)_fs;
38 return fs->properties;
94 static void fs_test_wait_async(struct fs *_fs ATTR_UNUSED)
112 fs_set_error_async(_file->fs);
176 fs_set_error_async(_file->fs);
213 fs_set_error_async(_file->fs);
228 fs_set_error_async(_file->fs);
250 dest->copy_src = test_fs_file_get(_src->fs, fs_file_path(_src));
253 fs_set_error_async(_dest->fs);
278 fs_set_error_async(_dest->fs);
293 fs_set_error_async(_file->fs);
315 struct test_fs *fs = (struct test_fs *)_iter->fs;
320 array_sort(&fs->iter_files, i_strcmp_p);
326 struct test_fs *fs = (struct test_fs *)_iter->fs;
331 files = array_get(&fs->iter_files, &count);
371 struct test_fs *test_fs_get(struct fs *fs)
373 while (strcmp(fs->name, "test") != 0) {
374 i_assert(fs->parent != NULL);
375 fs = fs->parent;
377 return (struct test_fs *)fs;
380 struct test_fs_file *test_fs_file_get(struct fs *fs, const char *path)
384 fs = &test_fs_get(fs)->fs;
386 for (file = fs->files;; file = file->next) {
394 const struct fs fs_class_test = {