diff options
| author | Tom Rini <[email protected]> | 2026-05-25 13:44:45 -0600 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2026-05-25 13:44:45 -0600 |
| commit | 8d5f30b52f7c800c2177188fc4d331fb7af2c46a (patch) | |
| tree | a3f23faa01933dcb49c22ca50c8d5a9e3293a87a /doc/develop | |
| parent | 77efd55f89e406d49a8697fd5475b6ab2ba6497c (diff) | |
| parent | e11b0c5cab44817b3c1cb4fd29339010b4db4321 (diff) | |
Merge patch series "env: migrate static flags list to Kconfig"next
This series from James Hilliard <[email protected]> converts the
static flags list for the environment to be configured via Kconfig and
updates the documentation.
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'doc/develop')
| -rw-r--r-- | doc/develop/environment.rst | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/doc/develop/environment.rst b/doc/develop/environment.rst index e46cd39d601..a7ed4aab0a5 100644 --- a/doc/develop/environment.rst +++ b/doc/develop/environment.rst @@ -49,3 +49,43 @@ The signature of the callback functions is:: include/search.h The return value is 0 if the variable change is accepted and 1 otherwise. + +Flags for environment variables +------------------------------- + +Environment flags validate the values given to environment variables and +restrict how environment variables can be changed. + +The static list is configured with CONFIG_ENV_FLAGS_LIST_STATIC. The list +must be in the following format:: + + type_attribute = [s|d|x|b|i|m] + access_attribute = [a|r|o|c|w] + attributes = type_attribute[access_attribute] + entry = variable_name[:attributes] + list = entry[,list] + +The type attributes are: + +* s - String (default) +* d - Decimal +* x - Hexadecimal +* b - Boolean ([1yYtT|0nNfF]) +* i - IP address, if networking is enabled +* m - MAC address, if networking is enabled + +The access attributes are: + +* a - Any (default) +* r - Read-only +* o - Write-once +* c - Change-default +* w - Writeable, if CONFIG_ENV_WRITEABLE_LIST is enabled + +CONFIG_ENV_FLAGS_LIST_DEFAULT defines the ``.flags`` variable in the +default or embedded environment. Any association in ``.flags`` overrides +an association in the static list. + +If CONFIG_REGEX is defined, the variable name is evaluated as a regular +expression. This allows multiple variables to define the same flags without +explicitly listing them all. |
