quota_get_specials_user quota_get_specials_group
quota_free_specials quota_get_user quota_set_user
quota_get_group quota_set_group - quota manipulation func
tions
SYNOPSIS
#include <sys/types.h>
#include <errno.h>
#include <libuser/quota.h>
char **quota_get_specials_user(void);
char **quota_get_specials_group(void);
void quota_free_specials(char **specials);
int quota_get_user(uid_t uid, const char *special,
int32_t *inode_soft, int32_t *inode_hard,
int32_t *inode_usage, int32_t *inode_grace,
int32_t *block_soft, int32_t *block_hard,
int32_t *block_usage, int32_t *block_grace);
int quota_set_user(uid_t uid, const char *special,
int32_t inode_soft, int32_t inode_hard,
int32_t inode_grace, int32_t block_soft,
int32_t block_hard, int32_t block_grace);
int quota_get_group(gid_t gid, const char *special,
int32_t *inode_soft, int32_t *inode_hard,
int32_t *inode_usage, int32_t *inode_grace,
int32_t *block_soft, int32_t *block_hard,
int32_t *block_usage, int32_t *block_grace);
int quota_set_group(gid_t gid, const char *special,
int32_t inode_soft, int32_t inode_hard,
int32_t inode_grace, int32_t block_soft,
int32_t block_hard, int32_t block_grace);
DESCRIPTION
Quota support under Linux can be enabled for users and
groups on a per- filesystem basis. For each user or group
for which a quota is set, the Linux kernel will keep track
of the number of inodes (files) and disk blocks (kilo
bytes) used by each user or group on each filesystem.
A quota is defined for a user or a group using a soft
limit (also known as the quota), a hard limit (also known
simply as the limit), and a grace period. The kernel will
not allow a user's usage to grow beyond the hard limit,
and will periodically warn the user (or members of the
group) when usage has exceeded the soft limit for longer
than the grace period.
The quota_get_specials_user and quota_get_specials_group
functions can be used to obtain a list of mounted devices
which have user or group quotas enabled.
used to obtain disk and inode usage and quotas for users
and groups, respectively.
The quota_set_user and quota_set_group functions can be
used to set disk and inode quotas for users and groups,
respectively. Setting any parameter to -1 will cause it
to be ignored, and the corresponding limit to not be
changed. To disable a quota, set the soft limit, hard
limit, and grace time to 0.
RETURN VALUE
The quota_get_specials_user and quota_get_specials_group
functions return a NULL-terminated array of strings on
success, or NULL on failure. The returned list must be
freed by calling quota_free_specials.
The quota_get_user, quota_set_user, and quota_get_group,
quota_set_group functions all return 0 on success, and
non-zero values on failure, with the specific error code
stored in the global variable errno. The values of these
error codes include the standard system error codes as
well as those defined for the quotactl system call.
SEE ALSO
quotactl(2), fstab(5), mount(8)
Man(1) output converted with
man2html