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)
Wed, Nov 26, 5:33 PM
Unknown Object (File)
Mon, Nov 24, 2:13 PM
Unknown Object (File)
Mon, Nov 24, 12:32 PM
Unknown Object (File)
Tue, Nov 11, 12:06 AM
Unknown Object (File)
Wed, Oct 29, 10:03 AM
Unknown Object (File)
Wed, Oct 29, 7:46 AM
Unknown Object (File)
Wed, Oct 29, 7:46 AM
Unknown Object (File)
Wed, Oct 29, 7:32 AM
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