diff options
author | Simon Glass <sjg@chromium.org> | 2017-08-03 12:22:13 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-08-16 08:30:32 -0400 |
commit | bfebc8c965e41d62dc6355d09bdd63ca57011b99 (patch) | |
tree | 2739bc0c03f554119f9feaaea578a11f0d08aa61 /cmd | |
parent | 00caae6d47645e68d6e5277aceb69592b49381a6 (diff) | |
download | u-boot-bfebc8c965e41d62dc6355d09bdd63ca57011b99.tar.gz u-boot-bfebc8c965e41d62dc6355d09bdd63ca57011b99.tar.bz2 u-boot-bfebc8c965e41d62dc6355d09bdd63ca57011b99.zip |
env: Rename getenv_hex(), getenv_yesno(), getenv_ulong()
We are now using an env_ prefix for environment functions. Rename these
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 'cmd')
-rw-r--r-- | cmd/fdt.c | 2 | ||||
-rw-r--r-- | cmd/nvedit.c | 4 | ||||
-rw-r--r-- | cmd/source.c | 2 | ||||
-rw-r--r-- | cmd/trace.c | 6 | ||||
-rw-r--r-- | cmd/ximg.c | 2 |
5 files changed, 8 insertions, 8 deletions
@@ -111,7 +111,7 @@ static int do_fdt(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) return 1; printf("The address of the fdt is %#08lx\n", control ? (ulong)map_to_sysmem(blob) : - getenv_hex("fdtaddr", 0)); + env_get_hex("fdtaddr", 0)); return 0; } diff --git a/cmd/nvedit.c b/cmd/nvedit.c index 0468a4b7e9..4033d90c8e 100644 --- a/cmd/nvedit.c +++ b/cmd/nvedit.c @@ -327,7 +327,7 @@ int env_set_hex(const char *varname, ulong value) return env_set(varname, str); } -ulong getenv_hex(const char *varname, ulong default_val) +ulong env_get_hex(const char *varname, ulong default_val) { const char *s; ulong value; @@ -690,7 +690,7 @@ int env_get_f(const char *name, char *buf, unsigned len) * found * @return the decoded value, or default_val if not found */ -ulong getenv_ulong(const char *name, int base, ulong default_val) +ulong env_get_ulong(const char *name, int base, ulong default_val) { /* * We can use env_get() here, even before relocation, since the diff --git a/cmd/source.c b/cmd/source.c index 177f86bb54..a9831b6608 100644 --- a/cmd/source.c +++ b/cmd/source.c @@ -40,7 +40,7 @@ source (ulong addr, const char *fit_uname) size_t fit_len; #endif - verify = getenv_yesno ("verify"); + verify = env_get_yesno("verify"); buf = map_sysmem(addr, 0); switch (genimg_get_format(buf)) { diff --git a/cmd/trace.c b/cmd/trace.c index e6c08e4ba5..a0a7dd1995 100644 --- a/cmd/trace.c +++ b/cmd/trace.c @@ -16,10 +16,10 @@ static int get_args(int argc, char * const argv[], char **buff, if (argc < 2) return -1; if (argc < 4) { - *buff_size = getenv_ulong("profsize", 16, 0); - *buff = map_sysmem(getenv_ulong("profbase", 16, 0), + *buff_size = env_get_ulong("profsize", 16, 0); + *buff = map_sysmem(env_get_ulong("profbase", 16, 0), *buff_size); - *buff_ptr = getenv_ulong("profoffset", 16, 0); + *buff_ptr = env_get_ulong("profoffset", 16, 0); } else { *buff_size = simple_strtoul(argv[3], NULL, 16); *buff = map_sysmem(simple_strtoul(argv[2], NULL, 16), diff --git a/cmd/ximg.c b/cmd/ximg.c index 50dc00e4f8..21b5c37721 100644 --- a/cmd/ximg.c +++ b/cmd/ximg.c @@ -52,7 +52,7 @@ do_imgextract(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) #endif uint8_t comp; - verify = getenv_yesno("verify"); + verify = env_get_yesno("verify"); if (argc > 1) { addr = simple_strtoul(argv[1], NULL, 16); |