Penguin
Annotated edit history of quotactl(2) version 2, including all changes. View license author blame.
Rev Author # Line
1 perry 1 !!NAME
2 PerryLorier 2 quotactl - manipulate disk quotas
1 perry 3
4 !!SYNOPSIS
2 PerryLorier 5 __#include <sys/types.h>__
6 __#include <sys/quota.h>__
1 perry 7
2 PerryLorier 8 __int quotactl (int__ ''cmd''__, const char *__''special''__, int__ ''id'' __, caddr_t__ ''addr''__);__
1 perry 9
2 PerryLorier 10 __#include <linux/unistd.h>__
1 perry 11
2 PerryLorier 12 ___syscall4(int, quotactl, int,__ ''cmd''__, const char *,__ ''special'' __, int,__ ''id''__, caddr_t,__ ''addr''__);__
1 perry 13
14 !!DESCRIPTION
2 PerryLorier 15 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.
1 perry 16
2 PerryLorier 17 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.
1 perry 18
2 PerryLorier 19 The second argument ''special'' is the block special device these quota apply to. It must be mounted.
1 perry 20
2 PerryLorier 21 The third argument ''id'' is the user or group id these quota apply to (when relevant).
1 perry 22
2 PerryLorier 23 The fourth argument ''addr'' is the address of a data structure, depending on the command.
1 perry 24
25 The ''subcmd'' is one of
26
2 PerryLorier 27 ;__Q_QUOTAON__: Enable quotas. The ''addr'' argument is the pathname of the file containing the quotas for the filesystem.
28 ;__Q_QUOTAOFF__: Disable quotas.
29 ;__Q_GETQUOTA__: Get limits and current usage of disk space. The ''addr'' argument is a pointer to a dqblk structure (defined in '''').
30 ;__Q_SETQUOTA__: Set limits and current usage; ''addr'' is as before.
31 ;__Q_SETQLIM__: Set limits; ''addr'' is as before.
32 ;__Q_SETUSE__: Set usage.
33 ;__Q_SYNC__: Sync disk copy of a filesystems quotas.
34 ;__Q_GETSTATS__: Get collected stats.
1 perry 35
36 !!RETURN VALUE
2 PerryLorier 37 On success, __quotactl__ returns 0. On error, -1 is returned, and ''errno'' is set appropriately.
1 perry 38
39 !!ERRORS
2 PerryLorier 40 ;[ENOPKG]: The kernel was compiled without quota support.
41 ;[EFAULT]: Bad ''addr'' value.
42 ;[EINVAL]: ''type'' is not a known quota type. Or, ''special'' could not be found.
43 ;[ENOTBLK]: ''special'' is not a block special device.
44 ;[ENODEV]: ''special'' cannot be found in the mount table.
45 ;[EACCES]: The quota file is not an ordinary file.
46 ;[EIO]: Cannot read or write the quota file.
47 ;[EMFILE]: Too many open files: cannot open quota file.
48 ;[EBUSY]: __Q_QUOTAON__ was asked, but quota were enabled already.
49 ;[ESRCH]: __Q_GETQUOTA__ or __Q_SETQUOTA__ or __Q_SETUSE__ or __Q_SETQLIM__ was asked for a file system that didn't have quota enabled.
50 ;[EPERM]: The process was not root (for the file system), and __Q_GETQUOTA__ was asked for another ''id'' than thatof the process itself, or anything other than __Q_GETSTATS__ or __Q_SYNC__ was asked.
1 perry 51
52 !!CONFORMING TO
2 PerryLorier 53 BSD
1 perry 54
55 !!SEE ALSO
2 PerryLorier 56 quota(1), getrlimit(2), setrlimit(2), ulimit(2), quotacheck(8), quotaon(8)
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.

PHP Warning

lib/blame.php:177: Warning: Invalid argument supplied for foreach() (...repeated 7 times)