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)
Sun, Oct 11, 4:07 PM
Unknown Object (File)
Sat, Sep 26, 5:45 PM
Unknown Object (File)
Thu, Sep 24, 3:46 AM
Unknown Object (File)
Wed, Sep 23, 1:20 PM
Unknown Object (File)
Sep 11 2026, 3:06 AM
Unknown Object (File)
Sep 11 2026, 2:46 AM
Unknown Object (File)
Sep 9 2026, 7:38 PM
Unknown Object (File)
Sep 8 2026, 10:38 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