4.3BSD-UWisc/man/cat2/setquota.2
SETQUOTA(2) UNIX Programmer's Manual SETQUOTA(2)
NAME
setquota - enable/disable quotas on a file system
SYNOPSIS
setquota(special, file)
char *special, *file;
DESCRIPTION
Disc quotas are enabled or disabled with the _s_e_t_q_u_o_t_a call.
_S_p_e_c_i_a_l indicates a block special device on which a mounted
file system exists. If _f_i_l_e is nonzero, it specifies a file
in that file system from which to take the quotas. If _f_i_l_e
is 0, then quotas are disabled on the file system. The
quota file must exist; it is normally created with the _q_u_o_-
_t_a_c_h_e_c_k(8) program.
Only the super-user may turn quotas on or off.
SEE ALSO
quota(2), quotacheck(8), quotaon(8)
RETURN VALUE
A 0 return value indicates a successful call. A value of -1
is returned when an error occurs and _e_r_r_n_o is set to indi-
cate the reason for failure.
ERRORS
_S_e_t_q_u_o_t_a will fail when one of the following occurs:
[EPERM] The caller is not the super-user.
[ENOENT] _S_p_e_c_i_a_l does not exist.
[ENOTBLK] _S_p_e_c_i_a_l is not a block device.
[ENXIO] The major device number of _s_p_e_c_i_a_l is out of
range (this indicates no device driver exists
for the associated hardware).
[EPERM] The pathname contains a character with the
high-order bit set.
[ENOTDIR] A component of the path prefix in _f_i_l_e is not
a directory.
[EACCES] _F_i_l_e resides on a file system different from
_s_p_e_c_i_a_l.
[EACCES] _F_i_l_e is not a plain file.
[ENAMETOOLONG] The pathname was too long.
Printed 12/27/86 19 August 1985 1
SETQUOTA(2) UNIX Programmer's Manual SETQUOTA(2)
[EFAULT] _S_p_e_c_i_a_l or _f_i_l_e points outside the process's
allocated address space.
[EIO] An I/O error occurred while reading from or
writing to the file system.
BUGS
The error codes are in a state of disarray; too many errors
appear to the caller as one value.
Printed 12/27/86 19 August 1985 2