Home
Main website
Display Sidebar
Hide Ads
Recent Changes
View Source:
quotactl(2)
Edit
PageHistory
Diff
Info
LikePages
You are viewing an old revision of this page.
View the current version
.
QUOTACTL !!!QUOTACTL NAME SYNOPSIS DESCRIPTION RETURN VALUE ERRORS CONFORMING TO SEE ALSO ---- !!NAME quotactl - manipulate disk quotas !!SYNOPSIS __#include __ #include __ __int quotactl (int__ ''cmd''__, const char *__''special''__, int__ ''id'' __, caddr_t__ ''addr''__);__ __#include __ ___syscall4(int, quotactl, int,__ ''cmd''__, const char *,__ ''special'' __, int,__ ''id''__, caddr_t,__ ''addr''__);__ !!DESCRIPTION The quota system defines for each user and/or group a soft limit and a hard limit bounding the amount of disk space that can be used on a given file system. The hard limit cannot be crossed. The soft limit can be crossed, but warnings will ensue. Moreover, the user cannot be above the soft limit for more than one week (by default) at a time: after this week the soft limit counts as hard limit. The __quotactl__ system call manipulates these quota. Its first argument is of the form ''QCMD(''__subcmd__'',''__type__'')'' where ''type'' is either __USRQUOTA__ or __GRPQUOTA__ (for user quota and group quota, respectively), and ''subcmd'' is described below. The second argument ''special'' is the block special device these quota apply to. It must be mounted. The third argument ''id'' is the user or group id these quota apply to (when relevant). The fourth argument ''addr'' is the address of a data structure, depending on the command. The ''subcmd'' is one of __Q_QUOTAON__ Enable quotas. The ''addr'' argument is the pathname of the file containing the quotas for the filesystem. __Q_QUOTAOFF__ Disable quotas. __Q_GETQUOTA__ Get limits and current usage of disk space. The ''addr'' argument is a pointer to a dqblk structure (defined in ''''). __Q_SETQUOTA__ Set limits and current usage; ''addr'' is as before. __Q_SETQLIM__ Set limits; ''addr'' is as before. __Q_SETUSE__ Set usage. __Q_SYNC__ Sync disk copy of a filesystems quotas. __Q_GETSTATS__ Get collected stats. !!RETURN VALUE On success, __quotactl__ returns 0. On error, -1 is returned, and ''errno'' is set appropriately. !!ERRORS __ENOPKG__ The kernel was compiled without quota support. __EFAULT__ Bad ''addr'' value. __EINVAL__ ''type'' is not a known quota type. Or, ''special'' could not be found. __ENOTBLK__ ''special'' is not a block special device. __ENODEV__ ''special'' cannot be found in the mount table. __EACCES__ The quota file is not an ordinary file. __EIO__ Cannot read or write the quota file. __EMFILE__ Too many open files: cannot open quota file. __EBUSY__ __Q_QUOTAON__ was asked, but quota were enabled already. __ESRCH__ __Q_GETQUOTA__ or __Q_SETQUOTA__ or __Q_SETUSE__ or __Q_SETQLIM__ was asked for a file system that didn't have quota enabled. __EPERM__ The process was not root (for the file system), and __Q_GETQUOTA__ was asked for another ''id'' than that of the process itself, or anything other than __Q_GETSTATS__ or __Q_SYNC__ was asked. !!CONFORMING TO BSD !!SEE ALSO quota(1), getrlimit(2), setrlimit(2), ulimit(2), quotacheck(8), quotaon(8) ----
5 pages link to
quotactl(2)
:
Man2q
setrlimit(2)
syscalls(2)
getrlimit(2)
getrusage(2)
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.