Page MenuHomeFreeBSD

Use if ... else when printing memory attributes
ClosedPublic

Authored by andrew on Apr 11 2021, 11:41 AM.
Tags
None
Referenced Files
F149345813: D29703.id87248.diff
Mon, Mar 23, 9:44 PM
Unknown Object (File)
Sat, Mar 21, 9:40 PM
Unknown Object (File)
Tue, Mar 17, 10:03 AM
Unknown Object (File)
Mon, Mar 16, 11:22 PM
Unknown Object (File)
Thu, Mar 12, 11:09 PM
Unknown Object (File)
Wed, Mar 11, 6:11 PM
Unknown Object (File)
Sat, Feb 28, 11:30 PM
Unknown Object (File)
Jan 27 2026, 8:29 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