All rights reserved.
Redistribution and use in source and binary forms are permitted
provided that this notice is preserved and that due credit is given
to the University of California at Berkeley. The name of the University
may not be used to endorse or promote products derived from this
software without specific prior written permission. This software
is provided ``as is'' without express or implied warranty.
@(#)quotactl.2 6.8 (Berkeley) 05/20/88
#include <sys/quota.h>quota(cmd, uid, arg, addr) int cmd, uid, arg; char *addr;
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 particular 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. Arg is a major-minor device indicating the file system to be sync'ed. If the arg parameter is specified as NODEV, all file systems that have disc quotas will be sync'ed. The uid 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 parameters 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 indicating a particular file system. Addr is a pointer to a struct dqwarn structure (defined in < sys/quota.h >). This call is restricted to the 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 user is under quota, his warning count is reset to MAX_*_WARN (defined in < sys/quota.h >). If the arg parameter is specified as NODEV, all file systems that 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.
15 [EINVAL] The kernel has not been compiled with the QUOTA option.
15 [EINVAL] Cmd is invalid.
15 [ESRCH] No disc quota is found for the indicated user.
15 [EPERM] The call is priviledged and the caller was not the super-user.
15 [ENODEV] The arg parameter is being interpreted as a major-minor device and it indicates an unmounted file system.
15 [EFAULT] An invalid addr is supplied; the associated structure could not be copied in or out of the kernel.
15 [EUSERS] The quota table is full.
The Australian spelling of disk is used throughout the quota facilities in honor of the implementors.