diff options
author | Simon Glass <sjg@chromium.org> | 2017-08-03 12:22:09 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-08-16 08:22:18 -0400 |
commit | 382bee57f19b4454e2015bc19a010bc2d0ab9337 (patch) | |
tree | 8c13efda2a6539cdbf1ac76fc458ffef1e9c966d /board/keymile/common/common.c | |
parent | 01510091de905c46620757b9027b2e55c4b3b313 (diff) |
env: Rename setenv() to env_set()
We are now using an env_ prefix for environment functions. Rename setenv()
for consistency. Also add function comments in common.h.
Suggested-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'board/keymile/common/common.c')
-rw-r--r-- | board/keymile/common/common.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/board/keymile/common/common.c b/board/keymile/common/common.c index 408079c9a1..56d3044241 100644 --- a/board/keymile/common/common.c +++ b/board/keymile/common/common.c @@ -51,7 +51,7 @@ int set_km_env(void) pnvramaddr = gd->ram_size - CONFIG_KM_RESERVED_PRAM - CONFIG_KM_PHRAM - CONFIG_KM_PNVRAM; sprintf((char *)buf, "0x%x", pnvramaddr); - setenv("pnvramaddr", (char *)buf); + env_set("pnvramaddr", (char *)buf); /* try to read rootfssize (ram image) from environment */ p = getenv("rootfssize"); @@ -60,15 +60,15 @@ int set_km_env(void) pram = (rootfssize + CONFIG_KM_RESERVED_PRAM + CONFIG_KM_PHRAM + CONFIG_KM_PNVRAM) / 0x400; sprintf((char *)buf, "0x%x", pram); - setenv("pram", (char *)buf); + env_set("pram", (char *)buf); varaddr = gd->ram_size - CONFIG_KM_RESERVED_PRAM - CONFIG_KM_PHRAM; sprintf((char *)buf, "0x%x", varaddr); - setenv("varaddr", (char *)buf); + env_set("varaddr", (char *)buf); kernelmem = gd->ram_size - 0x400 * pram; sprintf((char *)buf, "0x%x", kernelmem); - setenv("kernelmem", (char *)buf); + env_set("kernelmem", (char *)buf); return 0; } @@ -169,7 +169,7 @@ static int do_setboardid(cmd_tbl_t *cmdtp, int flag, int argc, return 1; } strcpy((char *)buf, p); - setenv("boardid", (char *)buf); + env_set("boardid", (char *)buf); printf("set boardid=%s\n", buf); p = get_local_var("IVM_HWKey"); @@ -178,7 +178,7 @@ static int do_setboardid(cmd_tbl_t *cmdtp, int flag, int argc, return 1; } strcpy((char *)buf, p); - setenv("hwkey", (char *)buf); + env_set("hwkey", (char *)buf); printf("set hwkey=%s\n", buf); printf("Execute manually saveenv for persistent storage.\n"); @@ -311,9 +311,9 @@ static int do_checkboardidhwk(cmd_tbl_t *cmdtp, int flag, int argc, envbid = bid; envhwkey = hwkey; sprintf(buf, "%lx", bid); - setenv("boardid", buf); + env_set("boardid", buf); sprintf(buf, "%lx", hwkey); - setenv("hwkey", buf); + env_set("hwkey", buf); } } /* end while( ! found ) */ } |