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)
Sun, Nov 30, 7:01 AM
Unknown Object (File)
Wed, Nov 26, 6:20 PM
Unknown Object (File)
Wed, Nov 26, 4:55 AM
Unknown Object (File)
Tue, Nov 25, 10:01 PM
Unknown Object (File)
Wed, Nov 19, 1:43 AM
Unknown Object (File)
Nov 5 2025, 11:27 PM
Unknown Object (File)
Nov 5 2025, 4:35 AM
Unknown Object (File)
Nov 4 2025, 8:39 PM
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