HomeFreeBSD

proccontrol: use a table for modes

Description

proccontrol: use a table for modes

Add a central table of modes and loop over it rather than spelling out
10 essentialy identical strcmp if statemnts. Use the stable to generate
usage as well reducing the number of ifdefs.

Disallow multiple -m options. Previouly multiple were allowed, but only
the last one was used and there was no indication this happened.

Reviewed by: kib, markj
Differential Revision: https://reviews.freebsd.org/D46426

Details

Provenance
brooksAuthored on Sep 12 2024, 11:35 AM
Reviewer
kib
Differential Revision
D46426: proccontrol: use a table for modes
Parents
rG3acf7e0da487: if_ovpn: avoid LOR between ovpn and UDP locks
Branches
Unknown
Tags
Unknown