|
|
1.1 ! root 1: .\" Copyright (c) 1983, 1990 Regents of the University of California. ! 2: .\" All rights reserved. ! 3: .\" ! 4: .\" This code is derived from software contributed to Berkeley by ! 5: .\" Robert Elz at The University of Melbourne. ! 6: .\" ! 7: .\" Redistribution and use in source and binary forms are permitted provided ! 8: .\" that: (1) source distributions retain this entire copyright notice and ! 9: .\" comment, and (2) distributions including binaries display the following ! 10: .\" acknowledgement: ``This product includes software developed by the ! 11: .\" University of California, Berkeley and its contributors'' in the ! 12: .\" documentation or other materials provided with the distribution and in ! 13: .\" all advertising materials mentioning features or use of this software. ! 14: .\" Neither the name of the University nor the names of its contributors may ! 15: .\" be used to endorse or promote products derived from this software without ! 16: .\" specific prior written permission. ! 17: .\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED ! 18: .\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF ! 19: .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ! 20: .\" ! 21: .\" @(#)quotactl.2 6.11 (Berkeley) 6/23/90 ! 22: .\" ! 23: .TH QUOTACTL 2 "June 23, 1990" ! 24: .UC 7 ! 25: .SH NAME ! 26: quotactl \- manipulate disk quotas ! 27: .SH SYNOPSIS ! 28: .BI "#include <ufs/quota.h>" " /* for ``ufs'' quotas */" ! 29: .PP ! 30: .nf ! 31: .B quotactl(path, cmd, id, addr) ! 32: .B char *path; ! 33: .B int cmd, id; ! 34: .B char *addr; ! 35: .fi ! 36: .SH DESCRIPTION ! 37: The ! 38: .I quotactl ! 39: call is used to enable and disable quotas and ! 40: to manipulate disk quotas for filesystems on ! 41: which quotas have been enabled. ! 42: .I Path ! 43: is the path name of any file within the mounted filesystem ! 44: to which the quota control command is to be applied. ! 45: The ! 46: .I cmd ! 47: parameter indicates a command to be applied to the ! 48: .IR id . ! 49: .I Addr ! 50: is the address of an optional, command specific, data structure ! 51: that is copied in or out of the system. The interpretation of ! 52: .I addr ! 53: is given with each command. ! 54: .PP ! 55: Currently quotas are supported only for the ``ufs'' filesystem. ! 56: For ``ufs'', ! 57: a command is composed of a primary command (see below) ! 58: and a command type that is used to interpret the ! 59: .IR id . ! 60: Types are supported for interpretation of user identifiers ! 61: and group identifiers. ! 62: The ``ufs'' specific commands are: ! 63: .TP ! 64: Q_QUOTAON ! 65: Enable disk quotas for the filesystem specified by ! 66: .IR path . ! 67: The command type specifies the type of the quotas being enabled. ! 68: The ! 69: .I addr ! 70: argument specifies a file from which to take the quotas. ! 71: The quota file must exist; ! 72: it is normally created with the ! 73: .IR quotacheck (8) ! 74: program. ! 75: The ! 76: .I id ! 77: argument is unused. ! 78: Only the super-user may turn quotas on. ! 79: .TP ! 80: Q_QUOTAOFF ! 81: Disable disk quotas for the filesystem specified by ! 82: .I path . ! 83: The command type specifies the type of the quotas being disabled. ! 84: The ! 85: .I addr ! 86: and ! 87: .I id ! 88: arguments are unused. ! 89: Only the super-user may turn quotas off. ! 90: .TP ! 91: Q_GETQUOTA ! 92: Get disk quota limits and current usage for the user or group ! 93: (as determined by the command type) with identifier ! 94: .IR id . ! 95: .I Addr ! 96: is a pointer to a struct dqblk structure (defined in ! 97: .RI < ufs/quota.h >). ! 98: .TP ! 99: Q_SETQUOTA ! 100: Set disk quota limits for the user or group ! 101: (as determined by the command type) with identifier ! 102: .IR id . ! 103: .I Addr ! 104: is a pointer to a struct dqblk structure (defined in ! 105: .RI < ufs/quota.h >). ! 106: The usage fields of the dqblk structure are ignored. ! 107: This call is restricted to the super-user. ! 108: .TP ! 109: Q_SETUSE ! 110: Set disk usage limits for the user or group ! 111: (as determined by the command type) with identifier ! 112: .IR id . ! 113: .I Addr ! 114: is a pointer to a struct dqblk structure (defined in ! 115: .RI < ufs/quota.h >). ! 116: Only the usage fields are used. ! 117: This call is restricted to the super-user. ! 118: .TP ! 119: Q_SYNC ! 120: Update the on-disk copy of quota usages. ! 121: The command type specifies which type of quotas are to be updated. ! 122: The \fIid\fP and \fIaddr\fP parameters are ignored. ! 123: .SH "RETURN VALUE" ! 124: A successful call returns 0, ! 125: otherwise the value \-1 is returned and the global variable ! 126: .I errno ! 127: indicates the reason for the failure. ! 128: .SH ERRORS ! 129: A \fIquotactl\fP call will fail when one of the following occurs: ! 130: .TP 15 ! 131: [EOPNOTSUPP] ! 132: The kernel has not been compiled with the QUOTA option. ! 133: .TP 15 ! 134: [EUSERS] ! 135: The quota table cannot be expanded. ! 136: .TP 15 ! 137: [EINVAL] ! 138: .I Cmd ! 139: or the command type is invalid. ! 140: .TP 15 ! 141: [EINVAL] ! 142: A pathname contains a character with the high-order bit set. ! 143: .TP 15 ! 144: [EACCES] ! 145: In Q_QUOTAON, the quota file is not a plain file. ! 146: .TP 15 ! 147: [EACCES] ! 148: Search permission is denied for a component of a path prefix. ! 149: .TP 15 ! 150: [ENOTDIR] ! 151: A component of a path prefix is not a directory. ! 152: .TP 15 ! 153: [ENAMETOOLONG] ! 154: A component of either pathname exceeded 255 characters, ! 155: or the entire length of either path name exceeded 1023 characters. ! 156: .TP 15 ! 157: [ENOENT] ! 158: A filename does not exist. ! 159: .TP 15 ! 160: [ELOOP] ! 161: Too many symbolic links were encountered in translating a pathname. ! 162: .TP 15 ! 163: [EROFS] ! 164: In Q_QUOTAON, the quota file resides on a read-only filesystem. ! 165: .TP 15 ! 166: [EIO] ! 167: An I/O error occurred while reading from or writing ! 168: to a file containing quotas. ! 169: .TP 15 ! 170: [EFAULT] ! 171: An invalid ! 172: .I addr ! 173: is supplied; the associated structure could not be copied in or out ! 174: of the kernel. ! 175: .TP 15 ! 176: [EFAULT] ! 177: .I Path ! 178: points outside the process's allocated address space. ! 179: .TP 15 ! 180: [EPERM] ! 181: The call is privileged and the caller was not the super-user. ! 182: .SH "SEE ALSO" ! 183: quota(1), ! 184: fstab(5), ! 185: edquota(8), quotacheck(8), quotaon(8), repquota(8) ! 186: .SH BUGS ! 187: There should be some way to integrate this call with the resource ! 188: limit interface provided by ! 189: .IR setrlimit (2) ! 190: and ! 191: .IR getrlimit (2).
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.