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, Sep 5, 11:03 PM
Unknown Object (File)
Sat, Sep 5, 5:58 AM
Unknown Object (File)
Sat, Sep 5, 4:48 AM
Unknown Object (File)
Fri, Sep 4, 3:40 AM
Unknown Object (File)
Thu, Sep 3, 6:32 PM
Unknown Object (File)
Thu, Sep 3, 5:06 PM
Unknown Object (File)
Thu, Sep 3, 8:41 AM
Unknown Object (File)
Thu, Sep 3, 5:42 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