HomeFreeBSD

Add sysctl(8) formatting for hw.pagesizes.

Description

Add sysctl(8) formatting for hw.pagesizes.

  • Change the type of hw.pagesizes to OPAQUE, since it returns an array.
  • Modify the handler to only truncate the returned length if the caller supplied an output buffer. This allows use of the trick of passing a NULL output buffer to fetch the output size, while preserving compatibility if MAXPAGESIZES is increased.
  • Add a "S,pagesize" formatter to sysctl(8).

Reviewed by: alc, kib
MFC after: 2 weeks
Sponsored by: Juniper Networks, Inc.
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D26239

Details

Provenance
markjAuthored on
Reviewer
alc
Differential Revision
D26239: Add sysctl(8) formatting for hw.pagesizes.
Parents
rS365267: Include the psind in data returned by mincore(2).
Branches
Unknown
Tags
Unknown