Q_GETINFO(2const)

πŸ“¦
version 6.20 Β· 2 versions
, in arch rolling, nixpkgs unstable

πŸ’– 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:


fr fr, don't forget: addr is a dqinfo(2type) pointer, the kernel fills in everything, and .dqi_valid says 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
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms