HomeFreeBSD

ps(1): Constify the format strings for canned displays

Description

ps(1): Constify the format strings for canned displays

Now that removal of non-explicitly-requested duplicate columns work with
a O(n) algorithm, remove the ad-hoc optimization of crushing the canned
displays' formats after first use and constify their format strings.

No functional change intended.

This change could also be useful if/when allowing, e.g., to double
letters of canned displays to indicate their columns should not be
subject to automatic removal of duplicates (e.g., 'ps -ll').

MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D49614

(cherry picked from commit fd6b81712eb9a77bbe484954d18fe1fc4a27116b)

Details

Provenance
olceAuthored on Apr 1 2025, 12:50 PM
Differential Revision
D49614: ps(1): Constify the format strings for canned displays
Parents
rG7aa2f4826717: ps(1): Remove not-explicitly-requested columns with duplicate data
Branches
Unknown
Tags
Unknown