QUOTA(2-BSD) RISC/os Reference Manual QUOTA(2-BSD)
NAME
quota - manipulate disk quotas
SYNOPSIS
#include <sys/quota.h>
quota(cmd, uid, arg, addr)
int cmd, uid, arg;
caddrt addr;
DESCRIPTION
N.B.: This call is not implemented in the current version of
the system.
The quota call manipulates disk quotas for file systems
which have had quotas enabled with setquota(2). The cmd
parameter indicates a command to be applied to the user ID
uid. arg is a command specific argument and addr is the
address of an optional, command specific, data structure
which is copied in or out of the system. The interpretation
of arg and addr is given with each command below.
Q_SETDLIM Set disc quota limits and current usage for the
user with ID uid. arg is a major-minor device
indicating a particular file system. addr is a
pointer to a struct dqblk structure (defined in
<sys/quota.h>). This call is restricted to the
super-user.
Q_GETDLIM Get disc quota limits and current usage for the
user with ID uid. The remaining parameters are as
for Q_SETDLIM.
Q_SETDUSE Set disc usage limits for the user with ID uid.
arg is a major-minor device indicating a particu-
lar file system. addr is a pointer to a struct
dqusage structure (defined in <sys/quota.h>).
This call is restricted to the super-user.
Q_SYNC Update the on-disc copy of quota usages. The uid,
arg, and addr parameters are ignored.
Q_SETUID Change the calling process's quota limits to those
of the user with ID uid. The arg and addr parame-
ters are ignored. This call is restricted to the
super-user.
Q_SETWARN Alter the disc usage warning limits for the user
with ID uid. arg is a major-minor device indicat-
ing a particular file system. addr is a pointer
to a struct dqwarn structure (defined in
<sys/quota.h>). This call is restricted to the
Printed 11/19/92 Page 1
QUOTA(2-BSD) RISC/os Reference Manual QUOTA(2-BSD)
super-user.
Q_DOWARN Warn the user with user ID uid about excessive
disc usage. This call causes the system to check
its current disc usage information and print a
message on the terminal of the caller for each
file system on which the user is over quota. If
the arg parameter is specified as NODEV, all file
systems which have disc quotas will be checked.
Otherwise, arg indicates a specific major-minor
device to be checked. This call is restricted to
the super-user.
RETURN VALUE
A successful call returns 0 and, possibly, more information
specific to the cmd performed; when an error occurs, the
value -1 is returned and errno is set to indicate the rea-
son.
ERRORS
A quota call will fail when one of the following occurs:
[EINVAL] cmd is invalid.
[ESRCH] No disc quota is found for the indicated user.
[EPERM] The call is privileged and the caller was not the
super-user.
[EINVAL] The arg parameter is being interpreted as a
major-minor device and it indicates an unmounted
file system.
[EFAULT] An invalid addr is supplied; the associated struc-
ture could not be copied in or out of the kernel.
[EUSERS] The quota table is full.
SEE ALSO
setquota(2). quotaon(1M), quotacheck(1M) in the System
Administrator's Reference Manual.
BUGS
There should be someway to integrate this call with the
resource limit interface provided by setrlimit and
getrlimit(2).
The Australian spelling of disk is used throughout the quota
facilities in honor of the implementors.
Page 2 Printed 11/19/92