diff options
author | Tom Rini | 2023-10-26 14:31:16 -0400 |
---|---|---|
committer | Tom Rini | 2023-11-07 14:48:19 -0500 |
commit | d972192520af6db45b502130b5b1e2dfb21b89a1 (patch) | |
tree | 260b31d5fa16e4ed1fd2c231c8bdd6ed13146d5b /include/env.h | |
parent | d900449a7aa454dfe41e6f9fd8a162ff65781de0 (diff) |
env: Move env_set() out of cmd/nvedit.c and in to env/common.c
Inside of env/common.c we already have our helper env_set_xxx functions,
and even have a comment that explains why env_set() itself wasn't moved.
We now handle that move. This requires that we rename the previous
_do_env_set() to env_do_env_set() and note it as an internal env
function. Add comments about this function to explain why we do this
when we add the prototype. Add a new function, env_inc_id() to allow for
the counter to be updated by both commands and callers, and document
this as well by the prototype.
Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'include/env.h')
-rw-r--r-- | include/env.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/env.h b/include/env.h index 430c4fa94a4..9778e3e4f2c 100644 --- a/include/env.h +++ b/include/env.h @@ -73,6 +73,14 @@ enum env_redund_flags { int env_get_id(void); /** + * env_inc_id() - Increase the sequence number for the environment + * + * Increment the value that is used by env_get_id() to inform callers + * if the environment has changed since they last checked. + */ +void env_inc_id(void); + +/** * env_init() - Set up the pre-relocation environment * * This locates the environment or uses the default if nothing is available. |