quota-fs.c revision 7243a0515dea6d73bcd69752d5eecfbdc9bd3d27
/* Copyright (C) 2005 Timo Sirainen */
/* Only for reporting filesystem quota */
#include "lib.h"
#include "str.h"
#include "quota-private.h"
#include "quota-fs.h"
#ifdef HAVE_FS_QUOTA
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#ifdef HAVE_STRUCT_DQBLK_CURSPACE
# define dqb_curblocks dqb_curspace
#endif
struct fs_quota {
const char *device;
const char *error;
unsigned int blk_size;
struct quota_root root;
};
struct fs_quota_root_iter {
struct quota_root_iter iter;
int sent;
};
{
#ifdef HAVE_STATFS_MNTFROMNAME
return NULL;
}
#else
FILE *f;
return NULL;
}
if (f == NULL) {
return NULL;
}
continue;
break;
}
}
endmntent(f);
return dev;
#endif
}
{
const char *device;
unsigned int blk_size = 0;
i_info("fs quota block device = %s",
}
return NULL;
}
{
}
static struct quota_root_iter *
{
struct fs_quota_root_iter *iter;
}
static struct quota_root *
{
struct fs_quota_root_iter *iter =
(struct fs_quota_root_iter *)_iter;
return NULL;
}
{
return 0;
}
static struct quota_root *
{
if (*name == '\0')
else
return NULL;
}
static const char *
{
return "";
}
static const char *const *
{
return resources;
}
static int
const char *name __attr_unused__,
{
return -1;
}
static int
{
*value_r = 0;
*limit_r = 0;
return 0;
return -1;
}
return 1;
}
static int
const char *name __attr_unused__,
{
return -1;
}
static struct quota_transaction_context *
{
struct quota_transaction_context *ctx;
return ctx;
}
static int
{
return 0;
}
static void
{
}
static int
int *too_large_r __attr_unused__)
{
/* no-op */
return 1;
}
static void
{
/* no-op */
}
static void
{
/* no-op */
}
{
}
"fs",
};
#endif