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)
Wed, Nov 5, 11:27 PM
Unknown Object (File)
Wed, Nov 5, 4:35 AM
Unknown Object (File)
Tue, Nov 4, 8:39 PM
Unknown Object (File)
Mon, Oct 27, 3:50 PM
Unknown Object (File)
Oct 6 2025, 1:43 AM
Unknown Object (File)
Oct 4 2025, 9:21 AM
Unknown Object (File)
Sep 9 2025, 11:52 AM
Unknown Object (File)
Aug 15 2025, 2:43 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