.TH SETQUOTA 2 "7 July 1983" .UC 4 .SH NAME setquota \- enable/disable quotas on a file system .SH SYNOPSIS .nf .B setquota(special, file) .B char *special, *file; .fi .SH DESCRIPTION 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 checkquota (8) program. .PP 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 [NODEV] The caller is not the super-user. .TP 15 [NODEV] .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 [EROFS] .I File resides on a read-only file system. .TP 15 [EACCES] .I File resides on a file system different from .IR special . .TP 15 [EACCES] .I File is not a plain file. .SH BUGS The error codes are in a state of disarray; too many errors appear to the caller as one value.