|QUOTACTL(2)||System Calls Manual||QUOTACTL(2)|
manipulate filesystem quotas
char *path, int
cmd, int id,
call enables, disables and manipulates filesystem quotas. A quota control
command given by cmd operates on the given filename
path for the given user id. The
address of an optional command specific data structure,
addr, may be given; its interpretation is discussed
below with each command.
Currently quotas are supported only for the “ffs” filesystem. For “ffs”, a command is composed of a primary command (see below) and a command type used to interpret the id. Types are supported for interpretation of user identifiers and group identifiers. The “ffs” specific commands are:
struct dqblkstructure. The usage fields of
struct dqblkstructure are ignored. This call is restricted to the superuser.
struct dqblkstructure. Only the usage fields are used. This call is restricted to the superuser.
Upon successful completion, the value 0 is returned; otherwise the value -1 is returned and the global variable errno is set to indicate the error.
quotactl() call will fail if:
Q_QUOTAON, the quota file is not a plain file.
NAME_MAXcharacters, or an entire pathname (including the terminating NUL) exceeded
Q_QUOTAON, the quota file resides on a read-only filesystem.
quotactl() function call appeared in
|January 19, 2015||OpenBSD-6.7|