HomeFreeBSD

Use if ... else when printing memory attributes

Description

Use if ... else when printing memory attributes

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.

Reviewed by: kib
MFC after: 2 weeks
Sponsored by: ABT Systems Ltd
Differential Revision: https://reviews.freebsd.org/D29703

(cherry picked from commit 15221c552b3cabcbf26613246e855010b176805a)

Details

Provenance
andrewAuthored on Apr 11 2021, 9:00 AM
Reviewer
kib
Differential Revision
D29703: Use if ... else when printing memory attributes
Parents
rG2c89a8c9aae2: Clean up the style in the arm64 bus.h
Branches
Unknown
Tags
Unknown