.\" @(#)setquota.2 1.6 85/08/20 SMI; from UCB 4.2 .TH SETQUOTA 2 "19 August 1985" .SH NAME setquota \- enable/disable quotas on a file system .SH SYNOPSIS .nf .B setquota(special, file) .B char *special, *file; .fi .IX setquota "" \fLsetquota\fP .IX "quotas for file system" "" "quotas for file system \(em \fLsetquota\fP" .IX "file system" setquota "" \fLsetquota\fP .IX "resource controls" "file system quotas setquota" "" "file system quotas \(em \fLsetquota\fP" .IX "enable file system quotas setquota" "" "enable file system quotas \(em \fLsetquota\fP" .IX "disable file system quotas setquota" "" "disable file system quotas \(em \fLsetquota\fP" .SH DESCRIPTION .LP Disc quotas are enabled or disabled with the .I setquota call. .I Special indicates a block special device on which a mounted file system exists. If .I file is nonzero, it specifies a file in that file system from which to take the quotas. If .I file is 0, then quotas are disabled on the file system. The quota file must exist; it is normally created with the .IR quotacheck (8) program. .LP Only the super-user may turn quotas on or off. .SH "SEE ALSO" quota(2), quotacheck(8), quotaon(8) .SH "RETURN VALUE" A 0 return value indicates a successful call. A value of \-1 is returned when an error occurs and .I errno is set to indicate the reason for failure. .SH ERRORS .I Setquota will fail when one of the following occurs: .TP 15 [EPERM] The caller is not the super-user. .TP 15 [ENOENT] .I Special does not exist. .TP 15 [ENOTBLK] .I Special is not a block device. .TP 15 [ENXIO] The major device number of .I special is out of range (this indicates no device driver exists for the associated hardware). .TP 15 [EPERM] The pathname contains a character with the high-order bit set. .TP 15 [ENOTDIR] A component of the path prefix in .I file is not a directory. .TP 15 [EACCES] .I File resides on a file system different from .IR special . .TP 15 [EACCES] .I File is not a plain file. .TP 15 [ENAMETOOLONG] The pathname was too long. .TP 15 [EFAULT] .I Special or .I file points outside the process's allocated address space. .TP 15 [EIO] An I/O error occurred while reading from or writing to the file system. .SH BUGS The error codes are in a state of disarray; too many errors appear to the caller as one value.