Annotation of 43BSDTahoe/man/man2/quota.2, revision 1.1.1.1

1.1       root        1: .\" Copyright (c) 1983 Regents of the University of California.
                      2: .\" All rights reserved.
                      3: .\"
                      4: .\" Redistribution and use in source and binary forms are permitted
                      5: .\" provided that the above copyright notice and this paragraph are
                      6: .\" duplicated in all such forms and that any documentation,
                      7: .\" advertising materials, and other materials related to such
                      8: .\" distribution and use acknowledge that the software was developed
                      9: .\" by the University of California, Berkeley.  The name of the
                     10: .\" University may not be used to endorse or promote products derived
                     11: .\" from this software without specific prior written permission.
                     12: .\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
                     13: .\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
                     14: .\" WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
                     15: .\"
                     16: .\"    @(#)quota.2     6.9 (Berkeley) 7/9/88
                     17: .\"
                     18: .TH QUOTA 2 "July 9, 1988"
                     19: .UC 5
                     20: .SH NAME
                     21: quota \- manipulate disk quotas
                     22: .SH SYNOPSIS
                     23: .nf
                     24: .B #include <sys/quota.h>
                     25: .PP
                     26: .B quota(cmd, uid, arg, addr)
                     27: .B int cmd, uid, arg;
                     28: .B char *addr;
                     29: .fi
                     30: .SH DESCRIPTION
                     31: The
                     32: .I quota
                     33: call manipulates disk quotas for file systems
                     34: that have had quotas enabled with
                     35: .IR setquota (2).
                     36: The
                     37: .I cmd
                     38: parameter indicates a command to be applied to
                     39: the user ID
                     40: .IR uid .
                     41: .I Arg
                     42: is a command specific argument and
                     43: .I addr
                     44: is the address of an optional, command specific, data structure
                     45: that is copied in or out of the system.  The interpretation of
                     46: .I arg
                     47: and
                     48: .I addr
                     49: is given with each command below.
                     50: .TP
                     51: Q_SETDLIM
                     52: Set disc quota limits and current usage for the user with ID
                     53: .IR uid .
                     54: .I Arg
                     55: is a major-minor device indicating a particular file system.
                     56: .I Addr
                     57: is a pointer to a struct dqblk structure (defined in 
                     58: .RI < sys/quota.h >).
                     59: This call is restricted to the super-user.
                     60: .TP
                     61: Q_GETDLIM
                     62: Get disc quota limits and current usage for the user with ID
                     63: .IR uid .
                     64: The remaining parameters are as for Q_SETDLIM.
                     65: .TP
                     66: Q_SETDUSE
                     67: Set disc usage limits for the user with ID
                     68: .IR uid .
                     69: .I Arg
                     70: is a major-minor device indicating a particular file system.
                     71: .I Addr
                     72: is a pointer to a struct dqusage structure (defined in
                     73: .RI < sys/quota.h >).
                     74: This call is restricted to the super-user.
                     75: .TP
                     76: Q_SYNC
                     77: Update the on-disc copy of quota usages.
                     78: .I Arg
                     79: is a major-minor device indicating the file system to be sync'ed.
                     80: If the
                     81: .I arg
                     82: parameter is specified as NODEV, all file systems that have
                     83: disc quotas will be sync'ed.
                     84: The \fIuid\fP and \fIaddr\fP parameters are ignored.
                     85: .TP
                     86: Q_SETUID
                     87: Change the calling process's quota limits to those of the
                     88: user with ID
                     89: .IR uid .
                     90: The 
                     91: .I arg
                     92: and
                     93: .I addr
                     94: parameters are ignored.  This call is restricted to the super-user.
                     95: .TP
                     96: Q_SETWARN
                     97: Alter the disc usage warning limits for the user with ID
                     98: .IR uid .
                     99: .I Arg
                    100: is a major-minor device indicating a particular file system.
                    101: .I Addr
                    102: is a pointer to a struct dqwarn structure (defined in
                    103: .RI < sys/quota.h >).
                    104: This call is restricted to the super-user.
                    105: .TP
                    106: Q_DOWARN
                    107: Warn the user with user ID
                    108: .I uid
                    109: about excessive disc usage.
                    110: This call causes the system to check its current disc usage
                    111: information and print a message on the terminal of
                    112: the caller for each file system on which the user is over quota.
                    113: If the user is under quota, his warning count is reset to MAX_*_WARN
                    114: (defined in
                    115: .RI < sys/quota.h >).
                    116: If the
                    117: .I arg
                    118: parameter is specified as NODEV, all file systems that have
                    119: disc quotas will be checked.  Otherwise, 
                    120: .I arg
                    121: indicates a specific major-minor device to be checked.
                    122: This call is restricted to the super-user.
                    123: .SH "RETURN VALUE"
                    124: A successful call returns 0,
                    125: otherwise the value \-1 is returned and the global variable
                    126: .I errno
                    127: indicates the reason for the failure.
                    128: .SH ERRORS
                    129: A \fIquota\fP call will fail when one of the following occurs:
                    130: .TP 15
                    131: [EINVAL]
                    132: The kernel has not been compiled with the QUOTA option.
                    133: .TP 15
                    134: [EINVAL]
                    135: .I Cmd
                    136: is invalid.
                    137: .TP 15
                    138: [ESRCH]
                    139: No disc quota is found for the indicated user.
                    140: .TP 15
                    141: [EPERM]
                    142: The call is priviledged and the caller was not the super-user.
                    143: .TP 15
                    144: [ENODEV]
                    145: The 
                    146: .I arg
                    147: parameter is being interpreted as a major-minor
                    148: device and it indicates an unmounted file system.
                    149: .TP 15
                    150: [EFAULT]
                    151: An invalid
                    152: .I addr
                    153: is supplied; the associated structure could not be copied in or out
                    154: of the kernel.
                    155: .TP 15
                    156: [EUSERS]
                    157: The quota table is full.
                    158: .SH "SEE ALSO"
                    159: setquota(2), quotaon(8), quotacheck(8)
                    160: .SH BUGS
                    161: There should be some way to integrate this call with the resource
                    162: limit interface provided by
                    163: .IR setrlimit (2)
                    164: and
                    165: .IR getrlimit (2).
                    166: .PP
                    167: The Australian spelling of
                    168: .I disk
                    169: is used throughout the quota facilities in honor of
                    170: the implementors.

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.