Page MenuHomeFreeBSD

Use if ... else when printing memory attributes
ClosedPublic

Authored by andrew on Apr 11 2021, 11:41 AM.
Tags
None
Referenced Files
F171053953: D29703.id.diff
Tue, Sep 8, 10:36 AM
Unknown Object (File)
Sun, Sep 6, 7:05 AM
Unknown Object (File)
Sat, Sep 5, 10:36 PM
Unknown Object (File)
Sat, Sep 5, 6:30 AM
Unknown Object (File)
Fri, Sep 4, 3:40 PM
Unknown Object (File)
Fri, Sep 4, 8:59 AM
Unknown Object (File)
Thu, Sep 3, 5:26 PM
Unknown Object (File)
Thu, Sep 3, 5:55 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