Q_GETINFO(2const)
π Q_GETINFO π
okay bestie, so this is a 2const page, which is the fancy way of saying "this is one specific little constant you can hand to quotactl()" π
the real manual you want open in another tab is quotactl(2). Anyway. Buckle up π
Library: it lives in the Standard C library β link with -lc, like everything else in libc πΈ
β¨ SYNOPSIS β¨
Two ways to do the thing β one through quotactl(), one straight through the syscall with an fd π¦
#include <sys/quota.h>
int quotactl(QCMD(Q_GETINFO, type), const char *_Nullable special, 0,
caddr_t addr);
and if you're feeling spicy and wanna go raw syscall (iykyk):
#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_GETINFO, type), 0,
struct dqinfo *addr);
note those includes are doing real work β the first one brings in the Q_* constants, the second brings in the SYS_* constants, don't skip them π
π DESCRIPTION π
So basically: this constant asks the kernel to get information about a quotafile. Think stuff like grace times β³ adorable, right?
The addr argument should be a pointer to a dqinfo(2type) structure. That's where the tea gets delivered π
And here's the cute part β as of right now, the kernel fills in all the entries of that dqinfo(2type) structure and marks them all as valid in the .dqi_valid field. Every single one. Slay π
β RETURN VALUE β
See quotactl(2). That's it, that's the whole section β it's all handled over there, go look π«Ά
π ERRORS π
See quotactl(2). Same energy, same page, same errors π
π STANDARDS π
- Linux. That's it. Periodt.
π°οΈ HISTORY π°οΈ
- Linux 2.4.22 β so this has been around for a minute, not me being born yesterday π it's giving vintage, it's giving icon
π SEE ALSO π
Go read these next, they're the whole friend group:
quotactl(2)quotactl_fd(2)Q_SETINFO(2const)β the other half of this duo, the setter to this getter π«dqinfo(2type)
fr fr, don't forget:addris adqinfo(2type)pointer, the kernel fills in everything, and.dqi_validsays so β¨
okay that's the whole page bestie, you understood it perfectly, highkey proud of you π this was Linux man-pages 6.20, dated 2026-06-05 β mwah, love that for us πβ¨
π¦ where this page comes from
- arch rolling: man-pages 6.20-1 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
- nixpkgs unstable: man-pages 6.20
- π the page's license: Linux-man-pages-copyleft
- Copyright 1996, Andries E. Brouwer <aeb@cwi.nl>
- Copyright 2010, Jan Kara <jack@suse.cz>
- Copyright 2010, Michael Kerrisk <mtk.manpages@gmail.com>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms