sys_quotactl [fs/quota.c]
Manipulates disk quota. The quota system defines for each user and/or group a soft limit and a hard limit bounding the amount of disk space that can be used on a given file system. The hard limit cannot be crossed. The soft limit can be crossed, but warnings will ensue. Moreover, the user cannot be above the soft limit for more than one week (by default) at a time: after this week the soft limit counts as hard limit. Arguments
eax | 131
ebx | Operation to perform. This argument is constructed as follows: `((cmd shl SUBCMDSHIFT) or (type and SUBCMDMASK)) Where cmd is one of the following:`
`Q_SYNC` | `Sync disk copy of a filesystem's quota. *to be documented*`
`Q_QUOTAON` | `Enable quota. The esi argument is the a pointer to a null-terminated string specifying the pathname of the file containing the quota for the filesystem.`
`Q_QUOTAOFF` | `Disable quota. esi is ignored.`
`Q_GETFMT` | `*to be documented*`
`Q_GETINFO` | `*to be documented*`
`Q_SETINFO` | `*to be documented*`
`Q_GETQUOTA` | `Get limits and current usage of disk space. The esi argument is a pointer to a if_dqblk structure which will receive the information:`
`struc if_dqblk { .dqb_bhardlimit rq 1 .dqb_bsoftlimit rq 1 .dqb_curspace rq 1 .dqb_ihardlimit rq 1 .dqb_isoftlimit rq 1 .dqb_curinodes rq 1 .dqb_btime rq 1 .dqb_itime rq 1 .dqb_valid rq 1 }`
`Q_SETQUOTA` | `Set limits and current usage. The esi argument is a pointer to a properly initialized if_dqblk structure. See above.`
`And type is one of the following:`
`USRQUOTA` | `User quota.`
`GRPQUOTA` | `Group quota.`
ecx | A pointer to a null-terminated string specifying the block special device these quota apply to. It must be mounted.
edx | User or group ID these quota apply to.
esi | This argument depends on the cmd used See above.
Return values If the system call succeeds the return value is 0. If the system call fails the return value is one of the following errno values:
`-EACCES` | `The quota file is not an ordinary file.`
`-EBUSY` | `Q_QUOTAON was asked, but quotas were enabled already.`
`-EFAULT` | `Bad esi value.`
`-EINVAL` | `type is not a known quota type. Or, pathname pointed by ecx could not be found.`
`-EIO` | `Cannot read or write the quota file.`
`-EMFILE` | `Too many open files: cannot open quota file.`
`-ENODEV` | `Pathname pointed by ecx cannot be found in the mount table.`
`-ENOPKG` | `The kernel was compiled without quota support.`
`-ENOTBLK` | `Pathname pointed by ecx is not a block special device.`
`-EPERM` | `The process was not root (for the file system), and Q_GETQUOTA was asked for another id than that of the process itself, or anything other than Q_SYNC was asked.`
`-ESRCH` | `Q_GETQUOTA or Q_SETQUOTA was asked for a file system that didn't have quota enabled.`
Remarks n/a Compatibility n/a