Q_SETQUOTA(2const)

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.

Standards

Linux.

History

Linux.

This operation supersedes the Q_SETQLIM and Q_SETUSE operations in the previous quota interfaces.

From man-pages 6.19-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.