Page MenuHomeFreeBSD

pf: Convenience function for optional (numeric) arguments
ClosedPublic

Authored by kp on May 27 2021, 2:17 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Apr 24, 7:55 AM
Unknown Object (File)
Sun, Mar 31, 7:13 PM
Unknown Object (File)
Mar 7 2024, 6:02 PM
Unknown Object (File)
Feb 16 2024, 10:58 PM
Unknown Object (File)
Jan 10 2024, 9:32 PM
Unknown Object (File)
Dec 22 2023, 11:52 PM
Unknown Object (File)
Dec 19 2023, 3:56 PM
Unknown Object (File)
Dec 14 2023, 10:08 PM

Details

Summary

Add _opt() variants for the uint* functions. These functions set the
provided default value if the nvlist doesn't contain the relevant value.
This is helpful for optional values (e.g. when the API is extended to
add new fields).

While here simplify the header by also using macros to create the
prototypes for the macro-generated function implementations.

MFC after: 2 weeks
Sponsored by: Rubicon Communications, LLC ("Netgate")

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 39515
Build 36404: arc lint + arc unit