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
F168876791: D49611.id.diff
Sun, Aug 30, 1:57 PM
F168789951: D49611.diff
Sun, Aug 30, 4:16 AM
Unknown Object (File)
Sat, Aug 29, 11:39 PM
Unknown Object (File)
Sat, Aug 29, 10:38 PM
Unknown Object (File)
Fri, Aug 28, 1:41 PM
Unknown Object (File)
Wed, Aug 26, 12:07 PM
Unknown Object (File)
Wed, Aug 26, 6:16 AM
Unknown Object (File)
Wed, Aug 26, 1:38 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