fs-test.c revision 4110f968c96680d61ca47bd7a903a254b911adda
/* Copyright (c) 2016-2017 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "istream.h"
#include "ostream.h"
#include "test-common.h"
#include "fs-test.h"
static struct fs *fs_test_alloc(void)
{
}
static int
{
return 0;
}
{
}
{
return fs->properties;
}
static struct fs_file *fs_test_file_alloc(void)
{
}
static void
{
}
{
}
{
}
{
}
static void
void *context)
{
}
{
}
static void
const char *value)
{
}
static int
{
if (file->wait_async) {
return -1;
}
if (file->io_failure) {
return -1;
}
return 0;
}
{
return TRUE;
}
{
}
static struct istream *
{
return i_stream_create_error(ENOENT);
if (file->io_failure)
return i_stream_create_error(EIO);
return input;
}
{
}
{
if (file->wait_async) {
return 0;
}
if (file->io_failure)
if (!success)
}
static int
{
return 0;
return 1;
}
{
}
{
if (file->wait_async) {
return -1;
}
if (file->io_failure) {
return -1;
}
}
{
if (file->wait_async) {
return -1;
}
if (file->io_failure) {
return -1;
}
return -1;
}
return 0;
}
{
struct test_fs_file *src;
if (dest->wait_async) {
return -1;
}
if (dest->io_failure) {
return -1;
}
return -1;
}
return 0;
}
{
return -1;
}
return -1;
return 0;
}
{
if (file->wait_async) {
return -1;
}
return -1;
}
return 0;
}
static struct fs_iter *fs_test_iter_alloc(void)
{
}
static void
{
}
{
const char *const *files, *p;
unsigned int count;
continue;
if (p == NULL)
return fname;
if (p[1] == '\0')
continue; /* dir/ */
return p+1;
}
if (p == NULL)
continue;
if (len == 0)
continue;
if (len == prev_dir_len &&
continue;
}
return NULL;
}
{
return ret;
}
{
}
}
{
break;
}
return (struct test_fs_file *)file;
}
const struct fs fs_class_test = {
.name = "test",
.v = {
NULL,
NULL,
NULL,
NULL,
}
};