QUOTACTL(4I) | Ioctl Requests | QUOTACTL(4I) |
quotactl
—
manipulate disk quotas
#include
<sys/fs/ufs_quota.h>
int
ioctl
(int
fd, Q_QUOTACTL,
struct quotctl *qp);
This
ioctl
()
call manipulates disk quotas. fd is the file
descriptor returned by the open(2)
system call after opening the quotas file (located
in the root directory of the filesystem running quotas).
Q_QUOTACTL
is defined in
/usr/include/sys/fs/ufs_quota.h.
qp is the address of the quotctl
structure which is defined as
struct quotctl { int op; uid_t uid; caddr_t addr; };
op indicates an operation to be applied to the user ID uid. (See below.) addr is the address of an optional, command specific, data structure which is copied in or out of the system. The interpretation of addr is given with each value of op below.
Q_QUOTAOFF
Q_GETQUOTA
<sys/fs/ufs_quota.h>
).
Only the super-user may get the quotas of a user other than himself.Q_SETQUOTA
<sys/fs/ufs_quota.h>
).
This call is restricted to the super-user.Q_SETQLIM
<sys/fs/ufs_quota.h>
).
This call is restricted to the super-user.Q_SYNC
Q_ALLSYNC
This Fn ioctl returns:
EFAULT
EINVAL
ENOENT
EPERM
ESRCH
EUSERS
If op is Q_QUOTAON
,
ioctl
() may set errno to:
There should be some way to integrate this call with the resource limit interface provided by setrlimit(2) and getrlimit(2).
This call is incompatible with Melbourne quotas.
October 28, 2017 | OmniOS |