Page MenuHomeFreeBSD

ps(1): Constify the array of valid keywords
ClosedPublic

Authored by olce on Apr 1 2025, 1:38 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Oct 6, 5:14 PM
Unknown Object (File)
Tue, Oct 6, 10:54 AM
Unknown Object (File)
Mon, Oct 5, 10:14 AM
Unknown Object (File)
Fri, Oct 2, 6:40 AM
Unknown Object (File)
Wed, Sep 16, 10:39 AM
Unknown Object (File)
Sep 5 2026, 11:03 PM
Unknown Object (File)
Sep 5 2026, 5:58 AM
Unknown Object (File)
Sep 5 2026, 4:48 AM
Subscribers

Details

Summary

Building on the previous commit that moved the 'width' field from VAR to
VARENT, it is now possible to constify the var[] array containing all
the recognized keywords.

As a side-effect, in parsefmt(), forget about allocating a new VAR for
the selected keyword to be pointed by the corresponding column (VARENT),
and instead just keep a pointer to that structure in var[].

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable