diff options
author | Simon Glass <sjg@chromium.org> | 2017-08-03 12:22:12 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-08-16 08:30:24 -0400 |
commit | 00caae6d47645e68d6e5277aceb69592b49381a6 (patch) | |
tree | c361aa0cea3093b93c1118266fe9e2b44ac6e453 /board/BuR | |
parent | fd1e959e91d2b0b2e853d09dd9167dfff18a616c (diff) | |
download | u-boot-00caae6d47645e68d6e5277aceb69592b49381a6.tar.gz |
env: Rename getenv/_f() to env_get()
We are now using an env_ prefix for environment functions. Rename these
two functions for consistency. Also add function comments in common.h.
Quite a few places use getenv() in a condition context, provoking a
warning from checkpatch. These are fixed up in this patch also.
Suggested-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'board/BuR')
-rw-r--r-- | board/BuR/common/common.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/board/BuR/common/common.c b/board/BuR/common/common.c index eb34de931e..39a600b5c1 100644 --- a/board/BuR/common/common.c +++ b/board/BuR/common/common.c @@ -263,9 +263,9 @@ static int load_devicetree(void) (size_t *)&dtbsize, NULL, 0x20000, (u_char *)dtbaddr); #else - char *dtbname = getenv("dtb"); - char *dtbdev = getenv("dtbdev"); - char *dtbpart = getenv("dtbpart"); + char *dtbname = env_get("dtb"); + char *dtbdev = env_get("dtbdev"); + char *dtbpart = env_get("dtbpart"); if (!dtbdev || !dtbpart || !dtbname) { printf("%s: <dtbdev>/<dtbpart>/<dtb> missing.\n", __func__); return -1; @@ -405,11 +405,11 @@ static void br_summaryscreen_printenv(char *prefix, char *name, char *altname, char *suffix) { - char *envval = getenv(name); + char *envval = env_get(name); if (0 != envval) { lcd_printf("%s %s %s", prefix, envval, suffix); } else if (0 != altname) { - envval = getenv(altname); + envval = env_get(altname); if (0 != envval) lcd_printf("%s %s %s", prefix, envval, suffix); } else { @@ -657,7 +657,7 @@ int board_eth_init(bd_t *bis) mac_addr[4] = mac_lo & 0xFF; mac_addr[5] = (mac_lo & 0xFF00) >> 8; - if (!getenv("ethaddr")) { + if (!env_get("ethaddr")) { #if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_USE_FDT) printf("<ethaddr> not set. trying DTB ... "); mac = dtbmacaddr(0); |