fs-api.c revision 251457b81928bab1ad25193e8a09bda829abe9ee
/* Copyright (c) 2010-2012 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "array.h"
#include "module-dir.h"
#include "str.h"
#include "istream.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_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,
{
T_BEGIN {
} T_END;
}
return -1;
}
}
{
if (fs->files_open_count > 0) {
i_panic("fs-%s: %u files still open",
}
}
{
T_BEGIN {
} T_END;
fs->files_open_count++;
return file;
}
{
}
{
}
{
}
{
return -1;
}
}
{
}
{
return "BUG: Unknown fs error";
}
{
}
{
}
{
const unsigned char *data;
/* backend didn't bother to implement read(), but we can do it with
streams. */
if (ret == 0) {
return -1;
}
} else {
}
return ret;
}
{
}
{
int err;
/* backend didn't bother to implement write(), but we can do it with
streams. */
if (!file->write_pending) {
return -1;
}
} else {
}
if (ret == 0) {
return -1;
}
return ret < 0 ? -1 : 0;
}
{
}
{
}
{
}
{
}
void *context)
{
else
}
{
return 0;
else
}
{
}
{
}
{
}
{
}
{
}
{
}
{
}
{
}
{
}
{
}
{
}
{
}
{
}
{
}