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/Arcturus | |
parent | 01510091de905c46620757b9027b2e55c4b3b313 (diff) | |
download | u-boot-382bee57f19b4454e2015bc19a010bc2d0ab9337.tar.gz |
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/Arcturus')
-rw-r--r-- | board/Arcturus/ucp1020/cmd_arc.c | 14 | ||||
-rw-r--r-- | board/Arcturus/ucp1020/ucp1020.c | 6 |
2 files changed, 10 insertions, 10 deletions
diff --git a/board/Arcturus/ucp1020/cmd_arc.c b/board/Arcturus/ucp1020/cmd_arc.c index fa6b4853f9..c32f7df454 100644 --- a/board/Arcturus/ucp1020/cmd_arc.c +++ b/board/Arcturus/ucp1020/cmd_arc.c @@ -138,7 +138,7 @@ int get_arc_info(void) printf("\t<not found>\n"); } else { printf("\t%s\n", smac[3]); - setenv("SERIAL", smac[3]); + env_set("SERIAL", smac[3]); } } @@ -152,7 +152,7 @@ int get_arc_info(void) char *ret = getenv("ethaddr"); if (strcmp(ret, __stringify(CONFIG_ETHADDR)) == 0) { - setenv("ethaddr", smac[2]); + env_set("ethaddr", smac[2]); printf("\t%s (factory)\n", smac[2]); } else { printf("\t%s\n", ret); @@ -160,8 +160,8 @@ int get_arc_info(void) } if (strcmp(smac[1], "00:00:00:00:00:00") == 0) { - setenv("eth1addr", smac[2]); - setenv("eth2addr", smac[2]); + env_set("eth1addr", smac[2]); + env_set("eth2addr", smac[2]); return 0; } @@ -172,7 +172,7 @@ int get_arc_info(void) char *ret = getenv("eth1addr"); if (strcmp(ret, __stringify(CONFIG_ETH1ADDR)) == 0) { - setenv("eth1addr", smac[1]); + env_set("eth1addr", smac[1]); printf("\t%s (factory)\n", smac[1]); } else { printf("\t%s\n", ret); @@ -180,7 +180,7 @@ int get_arc_info(void) } if (strcmp(smac[0], "00:00:00:00:00:00") == 0) { - setenv("eth2addr", smac[1]); + env_set("eth2addr", smac[1]); return 0; } @@ -191,7 +191,7 @@ int get_arc_info(void) char *ret = getenv("eth2addr"); if (strcmp(ret, __stringify(CONFIG_ETH2ADDR)) == 0) { - setenv("eth2addr", smac[0]); + env_set("eth2addr", smac[0]); printf("\t%s (factory)\n", smac[0]); } else { printf("\t%s\n", ret); diff --git a/board/Arcturus/ucp1020/ucp1020.c b/board/Arcturus/ucp1020/ucp1020.c index 0d086e87fa..2cc2e54d5b 100644 --- a/board/Arcturus/ucp1020/ucp1020.c +++ b/board/Arcturus/ucp1020/ucp1020.c @@ -230,9 +230,9 @@ int last_stage_init(void) strcat(newkernelargs, mmckargs); strcat(newkernelargs, " "); strcat(newkernelargs, &tmp[n]); - setenv("kernelargs", newkernelargs); + env_set("kernelargs", newkernelargs); } else { - setenv("kernelargs", mmckargs); + env_set("kernelargs", mmckargs); } } get_arc_info(); @@ -244,7 +244,7 @@ int last_stage_init(void) strcat(newkernelargs, sval); strcat(newkernelargs, " "); strcat(newkernelargs, kval); - setenv("kernelargs", newkernelargs); + env_set("kernelargs", newkernelargs); } } else { printf("Error reading kernelargs env variable!\n"); |