Page MenuHomeFreeBSD

Use if ... else when printing memory attributes
ClosedPublic

Authored by andrew on Apr 11 2021, 11:41 AM.
Tags
None
Referenced Files
F169301588: D29703.id87248.diff
Tue, Sep 1, 3:59 AM
F169120744: D29703.id87249.diff
Mon, Aug 31, 11:41 AM
F169096963: D29703.id.diff
Mon, Aug 31, 9:54 AM
F169085969: D29703.diff
Mon, Aug 31, 9:12 AM
Unknown Object (File)
Wed, Aug 26, 8:39 PM
Unknown Object (File)
Wed, Aug 26, 11:49 AM
Unknown Object (File)
Tue, Aug 25, 2:03 PM
Unknown Object (File)
Sat, Aug 15, 8:36 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