4.3BSD-Reno/share/man/cat2/quotactl.0

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




QUOTACTL(2)		      1990		      QUOTACTL(2)



NNAAMMEE
     quotactl - manipulate disk quotas

SSYYNNOOPPSSIISS
     ##iinncclluuddee <<uuffss//qquuoottaa..hh>>   /* _f_o_r ``_u_f_s'' _q_u_o_t_a_s */

     qquuoottaaccttll((ppaatthh,, ccmmdd,, iidd,, aaddddrr))
     cchhaarr **ppaatthh;;
     iinntt ccmmdd,, iidd;;
     cchhaarr **aaddddrr;;

DDEESSCCRRIIPPTTIIOONN
     The _q_u_o_t_a_c_t_l call is used to enable and disable quotas and
     to manipulate disk quotas for filesystems on which quotas
     have been enabled.  _P_a_t_h is the path name of any file within
     the mounted filesystem to which the quota control command is
     to be applied.  The _c_m_d parameter indicates a command to be
     applied to the _i_d.  _A_d_d_r is the address of an optional, com-
     mand specific, data structure that is copied in or out of
     the system.  The interpretation of _a_d_d_r is given with each
     command.

     Currently quotas are supported only for the ``ufs'' filesys-
     tem.  For ``ufs'', a command is composed of a primary com-
     mand (see below) and a command type that is used to inter-
     pret the _i_d.  Types are supported for interpretation of user
     identifiers and group identifiers.  The ``ufs'' specific
     commands are:

     Q_QUOTAON
	  Enable disk quotas for the filesystem specified by
	  _p_a_t_h.  The command type specifies the type of the quo-
	  tas being enabled.  The _a_d_d_r argument specifies a file
	  from which to take the quotas.  The quota file must
	  exist; it is normally created with the _q_u_o_t_a_c_h_e_c_k(8)
	  program.  The _i_d argument is unused.	Only the super-
	  user may turn quotas on.

     Q_QUOTAOFF
	  Disable disk quotas for the filesystem specified by
	  _p_a_t_h . The command type specifies the type of the quo-
	  tas being disabled.  The _a_d_d_r and _i_d arguments are
	  unused.  Only the super-user may turn quotas off.

     Q_GETQUOTA
	  Get disk quota limits and current usage for the user or
	  group (as determined by the command type) with identif-
	  ier _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>).

     Q_SETQUOTA
	  Set disk quota limits for the user or group (as



Printed 7/27/90               June				1






QUOTACTL(2)		      1990		      QUOTACTL(2)



	  determined by the command type) with identifier _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>).  The usage fields of the dqblk
	  structure are ignored.  This call is restricted to the
	  super-user.

     Q_SETUSE
	  Set disk usage limits for the user or group (as deter-
	  mined by the command type) with identifier _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 usage fields are used.  This
	  call is restricted to the super-user.

     Q_SYNC
	  Update the on-disk copy of quota usages.  The command
	  type specifies which type of quotas are to be updated.
	  The _i_d and _a_d_d_r parameters are ignored.

RREETTUURRNN VVAALLUUEE
     A successful call returns 0, otherwise the value -1 is
     returned and the global variable _e_r_r_n_o indicates the reason
     for the failure.

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

     [EOPNOTSUPP]   The kernel has not been compiled with the
		    QUOTA option.

     [EUSERS]	    The quota table cannot be expanded.

     [EINVAL]	    _C_m_d or the command type is invalid.

     [EINVAL]	    A pathname contains a character with the
		    high-order bit set.

     [EACCES]	    In Q_QUOTAON, the quota file is not a plain
		    file.

     [EACCES]	    Search permission is denied for a component
		    of a path prefix.

     [ENOTDIR]	    A component of a path prefix is not a direc-
		    tory.

     [ENAMETOOLONG] A component of either pathname exceeded 255
		    characters, or the entire length of either
		    path name exceeded 1023 characters.

     [ENOENT]	    A filename does not exist.

     [ELOOP]	    Too many symbolic links were encountered in



Printed 7/27/90               June				2






QUOTACTL(2)		      1990		      QUOTACTL(2)



		    translating a pathname.

     [EROFS]	    In Q_QUOTAON, the quota file resides on a
		    read-only filesystem.

     [EIO]	    An I/O error occurred while reading from or
		    writing to a file containing quotas.

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

     [EFAULT]	    _P_a_t_h points outside the process's allocated
		    address space.

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

SSEEEE AALLSSOO
     quota(1), fstab(5), edquota(8), quotacheck(8), quotaon(8),
     repquota(8)

BBUUGGSS
     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).





























Printed 7/27/90               June				3