4.3BSD-UWisc/man/cat2/quotactl.2

Compare this file to the similar file:
Show the results in this format:




QUOTACTL(2)         UNIX Programmer's Manual          QUOTACTL(2)



NAME
     quotactl - manipulate disk quotas

SYNOPSIS
     #include <ufs/quota.h>

     quotactl(cmd, special, uid, addr)
     int cmd;
     char *special;
     int uid;
     caddr_t addr;

DESCRIPTION
     The _q_u_o_t_a_c_t_l call manipulates disk quotas.  The _c_m_d parame-
     ter indicates a command to be applied to the user ID _u_i_d.
     _S_p_e_c_i_a_l is a pointer to a null-terminated string containing
     the path name of the block special device for the file sys-
     tem being manipulated.  The block special device must be
     mounted.  _A_d_d_r is the address of an optional, command
     specific, data structure which is copied in or out of the
     system.  The interpretation of _a_d_d_r is given with each com-
     mand below.

     Q_QUOTAON
          Turn on quotas for a file system.  _A_d_d_r is a pointer to
          a null terminated string containing the path name of
          file containing the quotas for the file system.  The
          quota file must exist; it is normally created with the
          _q_u_o_t_a_c_h_e_c_k(8) program.  This call is restricted to the
          super-user.

     Q_QUOTAOFF
          Turn off quotas for a file system.  This call is res-
          tricted to the super-user.

     Q_GETQUOTA
          Get disk quota limits and current usage for user _u_i_d.
          _A_d_d_r is a pointer to a struct dqblk structure (defined
          in <_u_f_s/_q_u_o_t_a._h>).  Only the super-user may get the
          quotas of a user other than himself.

     Q_SETQUOTA
          Set disk quota limits and current usage for user _u_i_d.
          _A_d_d_r is a pointer to a struct dqblk structure (defined
          in <_u_f_s/_q_u_o_t_a._h>).  This call is restricted to the
          super-user.

     Q_SETQLIM
          Set disk quota limits for user _u_i_d.  _A_d_d_r is a pointer
          to a struct dqblk structure (defined in <_u_f_s/_q_u_o_t_a._h>).
          This call is restricted to the super-user.




Printed 12/27/86         20 August 1985                         1






QUOTACTL(2)         UNIX Programmer's Manual          QUOTACTL(2)



     Q_SYNC
          Update the on-disk copy of quota usages.  This call is
          restricted to the super-user.

RETURN VALUE
     Upon successful completion, a value of 0 is returned.  Oth-
     erwise, a value of -1 is returned and _e_r_r_n_o is set to indi-
     cate the error.

ERRORS
     A _q_u_o_t_a_c_t_l call will fail when one of the following occurs:

     [EINVAL]       _C_m_d is invalid.

     [EPERM]        The call is privileged and the caller was not
                    the super-user.

     [EINVAL]       The _s_p_e_c_i_a_l parameter is not a mounted file
                    system or is a mounted file system without
                    quotas enabled.

     [ENOTBLK]      The _s_p_e_c_i_a_l parameter is not a block device.

     [EFAULT]       An invalid _a_d_d_r is supplied; the associated
                    structure could not be copied in or out of
                    the kernel.

     [EINVAL]       The _a_d_d_r parameter is being interpreted as
                    the path of a quota file which exists but is
                    either not a regular file or is not on the
                    file system pointed to by the _s_p_e_c_i_a_l parame-
                    ter.

     [EUSERS]       The quota table is full.

SEE ALSO
     quotaon(8), quotacheck(8)

BUGS
     There should be some way to integrate this call with the
     resource limit interface provided by _s_e_t_r_l_i_m_i_t(2) and
     _g_e_t_r_l_i_m_i_t(2).  Incompatible with Melbourne quotas.













Printed 12/27/86         20 August 1985                         2