]> git.ipfire.org Git - thirdparty/u-boot.git/commit
env: Move env_set() out of cmd/nvedit.c and in to env/common.c
authorTom Rini <trini@konsulko.com>
Thu, 26 Oct 2023 18:31:16 +0000 (14:31 -0400)
committerTom Rini <trini@konsulko.com>
Tue, 7 Nov 2023 19:48:19 +0000 (14:48 -0500)
commitd972192520af6db45b502130b5b1e2dfb21b89a1
tree260b31d5fa16e4ed1fd2c231c8bdd6ed13146d5b
parentd900449a7aa454dfe41e6f9fd8a162ff65781de0
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>
cmd/Makefile
cmd/nvedit.c
env/common.c
include/env.h
include/env_internal.h