<html><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title></title><style type="text/css">
<!--
.style1 {font-size: 18px;font-weight: bold;font-family: Georgia, "Times New Roman", Times, serif;}
.style2 {font-size: 14px}
a{color:#0000cc;text-decoration:none}
a:visited{color:#0000cc;text-decoration:none}
.style3 {color: #660000}
-->
</style></head>
<body style="margin:0px 0px 0px 0px;">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td bgcolor="#cccccc"><span class="style1" style="margin-left:5px">sys_quotactl <span class="style2">[fs/quota.c] </span></span></td>
</tr>
<tr>
<td><p style="margin-left:22px;margin-top:0px"><br />
Manipulates disk quota. <br />
<br />
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. </p>
<p style="margin-left:10px"><strong>Arguments</strong></p>
<table width="100%" border="0" style="margin-left:20px; margin-right:20px">
<tr>
<td width="6%" valign="top"><em>eax</em></td>
<td width="94%">131</td>
</tr>
<tr>
<td valign="top"><em>ebx</em></td>
<td>Operation to perform. This argument is constructed as follows: <br />
<br />
<code>((<em>cmd</em> shl SUBCMDSHIFT) or (<em>type</em> and SUBCMDMASK))<br />
<br />
Where <em>cmd</em> is one of the following: </code>
<table width="100%" border="0" style="border:dashed;border-bottom-width:1px;border-left-width:1px;border-right-width:1px;border-top-width:1px;border-color:#333333">
<tr>
<td><table width="100%" border="0">
<tr>
<td width="12%" valign="top"><code>Q_SYNC</code></td>
<td width="88%"><code>Sync disk copy of a filesystem's quota. <span class="style3">*to be documented*</span></code></td>
</tr>
<tr>
<td valign="top"><code> Q_QUOTAON</code></td>
<td><code>Enable quota. The <em>esi</em> argument is the a pointer to a null-terminated string specifying the pathname of the file containing the quota for the filesystem. </code></td>
</tr>
<tr>
<td valign="top"><code> Q_QUOTAOFF</code></td>
<td><code>Disable quota. <br />
<em>esi</em> is ignored.</code></td>
</tr>
<tr>
<td valign="top"><code>Q_GETFMT</code></td>
<td><code><span class="style3">*to be documented*</span></code></td>
</tr>
<tr>
<td valign="top"><code>Q_GETINFO</code></td>
<td><code><span class="style3">*to be documented*</span></code></td>
</tr>
<tr>
<td valign="top"><code>Q_SETINFO</code></td>
<td><code><span class="style3">*to be documented*</span></code></td>
</tr>
<tr>
<td valign="top"><code>Q_GETQUOTA</code></td>
<td><code>Get limits and current usage of disk space. The <em>esi</em> argument is a pointer to a <em>if_dqblk</em> structure which will receive the information:
</code>
<table width="100%" border="0" style="border:dashed;border-bottom-width:1px;border-left-width:1px;border-right-width:1px;border-top-width:1px;border-color:#333333">
<tr>
<td><code>struc if_dqblk<br>
{<br />
.dqb_bhardlimit rq 1 <br />
.dqb_bsoftlimit rq 1<br />
.dqb_curspace rq 1<br />
.dqb_ihardlimit rq 1<br />
.dqb_isoftlimit rq 1<br />
.dqb_curinodes rq 1<br />
.dqb_btime rq 1<br />
.dqb_itime rq 1<br />
.dqb_valid rq 1<br />
}</code></td>
</tr>
</table></td>
</tr>
<tr>
<td valign="top"><code>Q_SETQUOTA</code></td>
<td><code>Set limits and current usage. The <em>esi</em> argument is a pointer to a properly initialized <em>if_dqblk</em> structure. See above. </code></td>
</tr>
</table></td>
</tr>
</table>
<code>And <em>type</em> is one of the following: </code>
<table width="100%" border="0" style="border:dashed;border-bottom-width:1px;border-left-width:1px;border-right-width:1px;border-top-width:1px;border-color:#333333">
<tr>
<td><table width="100%" border="0">
<tr>
<td width="12%" valign="top"><code>USRQUOTA</code></td>
<td width="88%"><code>User quota.</code></td>
</tr>
<tr>
<td valign="top"><code>GRPQUOTA</code></td>
<td><code>Group quota. </code></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td valign="top"><em>ecx</em></td>
<td>A pointer to a null-terminated string specifying the block special device these quota apply to. It must be mounted. </td>
</tr>
<tr>
<td valign="top"><em>edx</em></td>
<td> User or group ID these quota apply to.</td>
</tr>
<tr>
<td valign="top"><em>esi</em></td>
<td>This argument depends on the <em>cmd</em> used See above. </td>
</tr>
</table>
<p style="margin-left:10px" ><strong>Return values</strong></p>
<p style="margin-left:22px;margin-right:10px" >If the system call succeeds the return value is 0.<br />
If the system call fails the return value is one of the following <em>errno</em> values:</p>
<table width="100%" border="0" style="border:dashed;border-bottom-width:1px;border-left-width:1px;border-right-width:1px;border-top-width:1px;border-color:#333333;margin-left:22px;margin-right:22px">
<tr>
<td><table width="100%" border="0">
<tr>
<td width="10%" valign="top"><code>-EACCES </code></td>
<td width="90%"><code>The quota file is not an ordinary file. </code></td>
</tr>
<tr>
<td valign="top"><code>-EBUSY </code></td>
<td><code>Q_QUOTAON was asked, but quotas were enabled already. </code></td>
</tr>
<tr>
<td valign="top"><code>-EFAULT </code></td>
<td><code>Bad <em>esi</em> value. </code></td>
</tr>
<tr>
<td valign="top"><code>-EINVAL</code></td>
<td><code><em>type</em> is not a known quota type. Or, pathname pointed by <em>ecx</em> could not be found. </code></td>
</tr>
<tr>
<td valign="top"><code>-EIO</code></td>
<td><code>Cannot read or write the quota file. </code></td>
</tr>
<tr>
<td valign="top"><code>-EMFILE </code></td>
<td><code>Too many open files: cannot open quota file. </code></td>
</tr>
<tr>
<td valign="top"><code>-ENODEV </code></td>
<td><code>Pathname pointed by <em>ecx</em> cannot be found in the mount table. </code></td>
</tr>
<tr>
<td valign="top"><code>-ENOPKG </code></td>
<td><code>The kernel was compiled without quota support. </code></td>
</tr>
<tr>
<td valign="top"><code>-ENOTBLK </code></td>
<td><code>Pathname pointed by <em>ecx</em> is not a block special device. </code></td>
</tr>
<tr>
<td valign="top"><code>-EPERM </code></td>
<td><code>The process was not root (for the file system), and Q_GETQUOTA was asked for another <em>id</em> than that of the process itself, or anything other than Q_SYNC was asked. </code></td>
</tr>
<tr>
<td valign="top"><code>-ESRCH </code></td>
<td><code>Q_GETQUOTA or Q_SETQUOTA was asked for a file system that didn't have quota enabled. </code></td>
</tr>
</table></td>
</tr>
</table>
<p style="margin-left:10px"><strong>Remarks</strong></p>
<p style="margin-left:22px">n/a</p>
<p style="margin-left:10px"><strong>Compatibility</strong></p>
<p style="margin-left:22px">n/a</p></td>
</tr>
</table></body></html>