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