static int fs_sis_init(struct fs *_fs, const char *args, const struct fs_settings *set) { enum fs_properties props; const char *parent_name, *parent_args, *error; if (*args == '\0') { fs_set_error(_fs, "Parent filesystem not given as parameter"); return -1; } parent_args = strchr(args, ':'); if (parent_args == NULL) { parent_name = args; parent_args = ""; } else { parent_name = t_strdup_until(args, parent_args); parent_args++; } if (fs_init(parent_name, parent_args, set, &_fs->parent, &error) < 0) { fs_set_error(_fs, "%s", error); return -1; } props = fs_get_properties(_fs->parent); if ((props & FS_SIS_REQUIRED_PROPS) != FS_SIS_REQUIRED_PROPS) { fs_set_error(_fs, "%s backend can't be used with SIS", parent_name); return -1; } return 0; }
static int sdbox_storage_create(struct mail_storage *_storage, struct mail_namespace *ns, const char **error_r) { struct dbox_storage *storage = DBOX_STORAGE(_storage); enum fs_properties props; if (dbox_storage_create(_storage, ns, error_r) < 0) return -1; if (storage->attachment_fs != NULL) { props = fs_get_properties(storage->attachment_fs); if ((props & FS_PROPERTY_RENAME) == 0) { *error_r = "mail_attachment_fs: " "Backend doesn't support renaming"; return -1; } } return 0; }
static enum fs_properties fs_sis_queue_get_properties(struct fs *_fs) { struct sis_queue_fs *fs = (struct sis_queue_fs *)_fs; return fs_get_properties(fs->super); }
static enum fs_properties fs_sis_get_properties(struct fs *_fs) { return fs_get_properties(_fs->parent); }
enum fs_properties fs_wrapper_get_properties(struct fs *fs) { return fs_get_properties(fs->parent); }