Manipulates disk quotas.
Standard C Library (libc.a)
int quotactl (Path, Cmd, ID, Addr) int Cmd, ID; char *Addr, *Path;
The quotactl subroutine enables, disables, and manipulates disk quotas for file systems on which quotas have been enabled.
Currently, disk quotas are supported only by the Journaled File System (JFS).
|Path||Specifies the path name of any file within the mounted file system to which the quota control command is to be applied.|
|Cmd|| Specifies the quota control command to be applied and whether it is applied to a user or group quota.
For JFSs, the Cmd parameter can be constructed through use of the QCMD(Cmd, type) macro contained within the jfs/quota.h file. The Cmd parameter specifies the quota control command. The type parameter specifies either user (USRQUOTA) or group (GRPQUOTA) quota type.
The valid JFS specific quota control values for the Cmd parameter are:
|ID||Specifies the user or group ID to which the quota control command applies. The ID parameter is interpreted by the specified quota type. The JFS file system supports quotas for IDs within the range of MINDQUID through MAXDQID.|
|Addr||Points to the address of an optional, command specific, data structure that is copied in or out of the system. The interpretation of the Addr parameter for each quota control command is given above.|
A successful call returns 0, otherwise the value -1 is returned and the errno global variable indicates the reason for the failure.
A quotactl subroutine will fail when one of the following occurs:
|EACCES||In the Q_QUOTAON command, the quota file is not a regular file.|
|EACCES||Search permission is denied for a component of a path prefix.|
|EFAULT||An invalid Addr parameter is supplied; the associated structure could not be copied in or out of the kernel.|
|EFAULT||The Path parameter points outside the process's allocated address space.|
|EINVAL||The specified quota control command or quota type is invalid.|
|EINVAL||Path name contains a character with the high-order bit set.|
|EINVAL||The ID parameter is outside of the supported range (MINDQID through MAXDQID).|
|EIO||An I/O error occurred while reading from or writing to a file containing quotas.|
|ELOOP||Too many symbolic links were encountered in translating a path name.|
|ENAMETOOLONG||A component of either path name exceeded 255 characters, or the entire length of either path name exceeded 1023 characters.|
|ENOENT||A file name does not exist.|
|ENOTBLK||Mounted file system is not a block device.|
|ENOTDIR||A component of a path prefix is not a directory.|
|EOPNOTSUPP||The file system does not support quotas.|
|EPERM||The quota control commands is privileged and the caller did not have root user authority.|
|EROFS||In the Q_QUOTAON command, the quota file resides on a read-only file system.|
|EUSERS||The in-core quota table cannot be expanded.|
The quotacheck command.
Disk Quota System Overview and How to Set Up the Disk Quota System in AIX Version 4.3 System Management Guide: Operating System and Devices.