netatalk  4.4.0dev
Free and Open Source Apple Filing Protocol (AFP) Server
Loading...
Searching...
No Matches
quota.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/param.h>
#include <unistd.h>
#include <fcntl.h>
#include <atalk/logger.h>
#include <atalk/afp.h>
#include <atalk/compat.h>
#include <atalk/unix.h>
#include <atalk/util.h>
#include "auth.h"
#include "directory.h"
#include "volume.h"
#include "unix.h"

Macros

#define WANT_USER_QUOTA   0
#define WANT_GROUP_QUOTA   1
#define USRQUOTA   0
#define QCMD(a, b)
#define dbtob(a)
#define tobytes(a, b)

Functions

static int overquota (struct dqblk *)
static char * special (char *file, int *nfs)
static int getfsquota (const AFPObj *obj, struct vol *vol, const int uid, struct dqblk *dq)
static int getquota (const AFPObj *obj, struct vol *vol, struct dqblk *dq, const uint32_t bsize)
int uquota_getvolspace (const AFPObj *obj, struct vol *vol, VolSpace *bfree, VolSpace *btotal, const uint32_t bsize)

Macro Definition Documentation

◆ dbtob

#define dbtob ( a)
Value:
((a) << 10)

◆ QCMD

#define QCMD ( a,
b )
Value:
(a)

◆ tobytes

#define tobytes ( a,
b )
Value:
uint64_t VolSpace
Definition include/atalk/volume.h:23
#define dbtob(a)
Definition quota.c:714

◆ USRQUOTA

#define USRQUOTA   0

◆ WANT_GROUP_QUOTA

#define WANT_GROUP_QUOTA   1

◆ WANT_USER_QUOTA

#define WANT_USER_QUOTA   0

Function Documentation

◆ getfsquota()

int getfsquota ( const AFPObj * obj,
struct vol * vol,
const int uid,
struct dqblk * dq )
static

◆ getquota()

int getquota ( const AFPObj * obj,
struct vol * vol,
struct dqblk * dq,
const uint32_t bsize )
static

◆ overquota()

int overquota ( struct dqblk * dqblk)
static

◆ special()

char * special ( char * file,
int * nfs )
static

◆ uquota_getvolspace()

int uquota_getvolspace ( const AFPObj * obj,
struct vol * vol,
VolSpace * bfree,
VolSpace * btotal,
const uint32_t bsize )