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)
Tue, Feb 25, 11:33 AM
Unknown Object (File)
Sat, Feb 8, 4:44 AM
Unknown Object (File)
Wed, Feb 5, 3:42 PM
Unknown Object (File)
Wed, Feb 5, 4:28 AM
Unknown Object (File)
Jan 30 2025, 4:11 PM
Unknown Object (File)
Jan 30 2025, 2:25 PM
Unknown Object (File)
Jan 27 2025, 1:54 PM
Unknown Object (File)
Jan 26 2025, 11:23 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