fs-api.c revision 392538eef147981f6d818cd14cabc94cf8049d8e
/* Copyright (c) 2010-2014 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "array.h"
#include "module-dir.h"
#include "str.h"
#include "hash-method.h"
#include "istream.h"
#include "istream-seekable.h"
#include "ostream.h"
#include "fs-api-private.h"
static int
{
int ret;
T_BEGIN {
} T_END;
if (ret < 0) {
/* a bit kludgy way to allow data stack frame usage in normal
conditions but still be able to return error message from
data stack. */
fs_last_error(fs));
return -1;
}
return 0;
}
{
}
static void fs_classes_deinit(void)
{
}
static void fs_classes_init(void)
{
}
{
if (!array_is_created(&fs_classes))
return *classp;
}
return NULL;
}
static void fs_class_deinit_modules(void)
{
}
static void fs_class_try_load_plugin(const char *driver)
{
struct module_dir_load_settings mod_set;
module_name, &mod_set);
}
const struct fs_settings *set,
{
const char *temp_file_prefix;
T_BEGIN {
} T_END;
}
return -1;
}
return -1;
return 0;
}
{
if (fs->files_open_count > 0) {
i_panic("fs-%s: %u files still open",
}
T_BEGIN {
} T_END;
}
{
}
{
(mode_flags & FS_OPEN_FLAG_ASYNC) != 0);
T_BEGIN {
} T_END;
fs->files_open_count++;
return file;
}
{
T_BEGIN {
} T_END;
if (metadata_pool != NULL)
}
{
}
} T_END;
}
{
}
{
}
}
{
struct fs_metadata *metadata;
}
{
} T_END;
}
{
int ret;
return -1;
}
T_BEGIN {
} T_END;
return ret;
}
{
}
{
}
static void ATTR_FORMAT(2, 0)
{
/* the error is always kept in the parentmost fs */
else {
}
}
{
/* the error is always kept in the parentmost fs */
return "BUG: Unknown fs error";
}
{
}
{
bool ret;
T_BEGIN {
} T_END;
return ret;
}
{
const unsigned char *data;
if (ret == 0) {
return -1;
}
} else {
}
return ret;
}
{
int ret;
T_BEGIN {
} T_END;
return ret;
}
/* backend didn't bother to implement read(), but we can do it with
streams. */
}
{
const unsigned char *data;
bool want_seekable = FALSE;
return file->seekable_input;
}
T_BEGIN {
} T_END;
if (input->stream_errno != 0) {
/* read failed already */
return input;
}
/* need to make the stream seekable */
i_stream_unref(&inputs[0]);
}
/* read the whole input stream before returning */
if (ret == 0) {
break;
}
}
}
i_stream_seek(input, 0);
}
return input;
}
{
int err;
if (!file->write_pending) {
return -1;
}
} else {
}
if (ret == 0) {
return -1;
}
return ret < 0 ? -1 : 0;
}
{
int ret;
T_BEGIN {
} T_END;
return ret;
}
/* backend didn't bother to implement write(), but we can do it with
streams. */
}
{
T_BEGIN {
} T_END;
}
{
int ret;
T_BEGIN {
} T_END;
if (ret != 0)
return ret;
}
{
int ret;
T_BEGIN {
} T_END;
if (ret != 0)
return ret;
}
{
T_BEGIN {
} T_END;
}
const void *digest)
{
}
void *context)
{
else
}
{
int ret;
ret = 0;
else T_BEGIN {
} T_END;
return ret;
}
{
int ret;
T_BEGIN {
} T_END;
return ret;
}
{
T_BEGIN {
} T_END;
}
{
int ret;
/* fallback to stat() */
return 1;
else
}
T_BEGIN {
} T_END;
return ret;
}
{
int ret;
T_BEGIN {
} T_END;
return ret;
}
{
if (fs_write_stream_finish_async(dest) <= 0)
return -1;
return 0;
}
} else {
}
return -1;
}
return -1;
}
return -1;
}
return -1;
return 0;
}
{
int ret;
T_BEGIN {
} T_END;
return ret;
}
{
int ret;
T_BEGIN {
} T_END;
return ret;
}
{
int ret;
T_BEGIN {
} T_END;
return ret;
}
{
int ret;
T_BEGIN {
} T_END;
return ret;
}
struct fs_iter *
{
T_BEGIN {
} T_END;
return iter;
}
{
int ret;
T_BEGIN {
} T_END;
return ret;
}
{
const char *ret;
T_BEGIN {
} T_END;
return ret;
}
void *context)
{
}
{
return iter->async_have_more;
}
{
}
{
}
{
}