sysdecode_quotactl_cmd(3)

sysdecode_quotactl_cmd3

Output name of quotactl command

Usage

#include <sysdecode.h>

bool

sysdecode_quotactl_cmd(FILE *fp, int cmd);

Library

library “libsysdecode”

Overview

The sysdecode_quotactl_cmd() function outputs a text description of the cmd argument to quotactl(2) to the stream fp. The description is formatted as an invocation of the QCMD macro defined in the ⟨ufs/ufs/quota.h⟩ header.

The function first computes the primary and secondary values used by QCMD to construct cmd. If the primary command value does not represent a known constant, sysdecode_quotactl_cmd() does not generate any output and returns false. Otherwise, sysdecode_quotactl_cmd() outputs text depicting an invocation of QCMD with the associated constants for the primary and secondary command values and returns true. If the secondary command values does not represent a known constant, its value is output as a hexadecimal integer.

Return values

The sysdecode_quotactl_cmd function returns true if it outputs a description of cmd and false if it does not.

Examples

The statement

sysdecode_quotatcl_cmd(stdout, QCMD(Q_GETQUOTA, USRQUOTA);

outputs the text “QCMD(Q_GETQUOTA, USRQUOTA)” to standard output.

Releases

24 releases since FreeBSD 11.1-RELEASE; the text changed 11 times.

  1. 11.1
  2. 11.2
  3. 11.3
  4. 11.4
  5. 12.0
  6. 12.1
  7. 12.2
  8. 12.3
  9. 12.4
  10. 13.0–13.1
  11. 13.2
  12. 13.3–16.0

From base 16.0-CURRENT-20261027-61c70dc16a79 in FreeBSD 16.0-CURRENT (2026-10-27). Parsed by carta from the page's mdoc source.