Q_SETQUOTA2const
Set quota information for user or group
Usage
#include <sys/quota.h>
int quotactl(QCMD(Q_SETQUOTA, type), const char *_Nullable special, int id, caddr_t addr);
#include <sys/quota.h> /* Definition of Q_* constants */ #include <sys/syscall.h> /* Definition of SYS_* constants */ #include <unistd.h>
int syscall(SYS_quotactl_fd, int fd, QCMD(Q_SETQUOTA, type), int id, struct dqblk *addr);
Library
Standard C library (libc, -lc)
Overview
Set quota information for user or group id, using the information supplied in the dqblk(2type) structure pointed to by addr.
The .dqb_valid field of the dqblk(2type) structure indicates which entries in the structure have been set by the caller.
This operation requires privilege (CAP_SYS_ADMIN).
Return value
See quotactl(2).
Errors
See quotactl(2).
- ERANGE
-
The specified limits are out of the range allowed by the quota format.