Q_GETQUOTA2const
Get disk quota limits and current usage for user or group
Usage
#include <sys/quota.h>
int quotactl(QCMD(Q_GETQUOTA, 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_GETQUOTA, type), int id, struct dqblk *addr);
Library
Standard C library (libc, -lc)
Overview
Get disk quota limits and current usage for user or group id.
The addr argument is a pointer to a dqblk(2type) structure.
Currently, the kernel fills in all entries of the dqblk(2type) structure and marks them as valid in the .dqb_valid field.
Unprivileged users may retrieve only their own quotas; a privileged user (CAP_SYS_ADMIN) can retrieve the quotas of any user.
Return value
See quotactl(2).
Errors
See quotactl(2).