Page MenuHomeFreeBSD

Use if ... else when printing memory attributes
ClosedPublic

Authored by andrew on Apr 11 2021, 11:41 AM.
Tags
None
Referenced Files
F96529336: D29703.id.diff
Wed, Sep 25, 9:08 AM
F96529321: D29703.id87249.diff
Wed, Sep 25, 9:08 AM
F96529306: D29703.id87248.diff
Wed, Sep 25, 9:08 AM
F96527437: D29703.diff
Wed, Sep 25, 9:00 AM
Unknown Object (File)
Sun, Sep 22, 12:39 AM
Unknown Object (File)
Wed, Sep 4, 8:14 PM
Unknown Object (File)
Fri, Aug 30, 9:45 PM
Unknown Object (File)
Fri, Aug 30, 6:19 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