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>
This commit is contained in:
Simon Glass
2017-08-03 12:22:13 -06:00
committed by Tom Rini
parent 00caae6d47
commit bfebc8c965
25 changed files with 70 additions and 59 deletions

View File

@ -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;
}

View File

@ -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

View File

@ -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)) {

View File

@ -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),

View File

@ -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);