Page MenuHomeFreeBSD

Use if ... else when printing memory attributes
ClosedPublic

Authored by andrew on Apr 11 2021, 11:41 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Feb 28, 11:30 PM
Unknown Object (File)
Jan 27 2026, 8:29 PM
Unknown Object (File)
Jan 25 2026, 10:04 AM
Unknown Object (File)
Jan 25 2026, 7:53 AM
Unknown Object (File)
Jan 23 2026, 11:53 AM
Unknown Object (File)
Dec 20 2025, 7:41 AM
Unknown Object (File)
Nov 26 2025, 5:33 PM
Unknown Object (File)
Nov 24 2025, 2:13 PM
Subscribers

Details

Summary

In vmstat there is a switch statement that converts these attributes to
a string. As some values can be duplicate we have to hide these from
userspace.

Replace this switch statement with an if ... else macro that lets us
repeat values without a compiler error.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable