diff options
author | Simon Glass <sjg@chromium.org> | 2019-08-01 09:47:00 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2019-08-11 16:43:41 -0400 |
commit | 0ac7d722ede8e64973f68dbcd07b9521ba04cb63 (patch) | |
tree | 179942d65436fafe8d1c3193bd15913f3b2c5f18 /env/nand.c | |
parent | 1f3db0c135fcaf40ff88bdcd058b56bc7e1f58f3 (diff) |
env: Move get/set_default_env() to env.h
Move these functions to the new header file and rename set_default_env()
to env_set_default() so that it has a consistent env_ prefix.
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'env/nand.c')
-rw-r--r-- | env/nand.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/env/nand.c b/env/nand.c index d0b95f483d..3e2235f5f3 100644 --- a/env/nand.c +++ b/env/nand.c @@ -15,6 +15,7 @@ #include <common.h> #include <command.h> +#include <env.h> #include <environment.h> #include <linux/stddef.h> #include <malloc.h> @@ -325,7 +326,7 @@ static int env_nand_load(void) tmp_env2 = (env_t *)malloc(CONFIG_ENV_SIZE); if (tmp_env1 == NULL || tmp_env2 == NULL) { puts("Can't allocate buffers for environment\n"); - set_default_env("malloc() failed", 0); + env_set_default("malloc() failed", 0); ret = -EIO; goto done; } @@ -364,14 +365,14 @@ static int env_nand_load(void) if (mtd && !get_nand_env_oob(mtd, &nand_env_oob_offset)) { printf("Found Environment offset in OOB..\n"); } else { - set_default_env("no env offset in OOB", 0); + env_set_default("no env offset in OOB", 0); return; } #endif ret = readenv(CONFIG_ENV_OFFSET, (u_char *)buf); if (ret) { - set_default_env("readenv() failed", 0); + env_set_default("readenv() failed", 0); return -EIO; } |