mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-09-27 23:20:26 +09:00
env: Drop env_relocate_spec() in favour of env_load()
This is a strange name for a function that loads the environment. There is now only one implementation of this function, so use the new env_load() function directly instead. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
parent
a69d0f60e5
commit
310fb14b26
@ -162,7 +162,7 @@ int spl_start_uboot(void)
|
|||||||
|
|
||||||
#ifdef CONFIG_SPL_ENV_SUPPORT
|
#ifdef CONFIG_SPL_ENV_SUPPORT
|
||||||
env_init();
|
env_init();
|
||||||
env_relocate_spec();
|
env_load();
|
||||||
if (getenv_yesno("boot_os") != 1)
|
if (getenv_yesno("boot_os") != 1)
|
||||||
return 1;
|
return 1;
|
||||||
#endif
|
#endif
|
||||||
|
@ -690,7 +690,7 @@ int spl_start_uboot(void)
|
|||||||
debug("%s\n", __func__);
|
debug("%s\n", __func__);
|
||||||
#ifdef CONFIG_SPL_ENV_SUPPORT
|
#ifdef CONFIG_SPL_ENV_SUPPORT
|
||||||
env_init();
|
env_init();
|
||||||
env_relocate_spec();
|
env_load();
|
||||||
debug("boot_os=%s\n", getenv("boot_os"));
|
debug("boot_os=%s\n", getenv("boot_os"));
|
||||||
if (getenv_yesno("boot_os") == 1)
|
if (getenv_yesno("boot_os") == 1)
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
@ -76,7 +76,7 @@ int spl_start_uboot(void)
|
|||||||
|
|
||||||
#ifdef CONFIG_SPL_ENV_SUPPORT
|
#ifdef CONFIG_SPL_ENV_SUPPORT
|
||||||
env_init();
|
env_init();
|
||||||
env_relocate_spec();
|
env_load();
|
||||||
if (getenv_yesno("boot_os") != 1)
|
if (getenv_yesno("boot_os") != 1)
|
||||||
return 1;
|
return 1;
|
||||||
#endif
|
#endif
|
||||||
|
@ -249,7 +249,7 @@ int spl_start_uboot(void)
|
|||||||
|
|
||||||
#ifdef CONFIG_SPL_ENV_SUPPORT
|
#ifdef CONFIG_SPL_ENV_SUPPORT
|
||||||
env_init();
|
env_init();
|
||||||
env_relocate_spec();
|
env_load();
|
||||||
if (getenv_yesno("boot_os") != 1)
|
if (getenv_yesno("boot_os") != 1)
|
||||||
return 1;
|
return 1;
|
||||||
#endif
|
#endif
|
||||||
|
@ -742,7 +742,7 @@ int spl_start_uboot(void)
|
|||||||
|
|
||||||
#ifdef CONFIG_SPL_ENV_SUPPORT
|
#ifdef CONFIG_SPL_ENV_SUPPORT
|
||||||
env_init();
|
env_init();
|
||||||
env_relocate_spec();
|
env_load();
|
||||||
if (getenv_yesno("boot_os") != 1)
|
if (getenv_yesno("boot_os") != 1)
|
||||||
return 1;
|
return 1;
|
||||||
#endif
|
#endif
|
||||||
|
@ -825,7 +825,7 @@ int spl_start_uboot(void)
|
|||||||
|
|
||||||
#ifdef CONFIG_SPL_ENV_SUPPORT
|
#ifdef CONFIG_SPL_ENV_SUPPORT
|
||||||
env_init();
|
env_init();
|
||||||
env_relocate_spec();
|
env_load();
|
||||||
if (getenv_yesno("boot_os") != 1)
|
if (getenv_yesno("boot_os") != 1)
|
||||||
return 1;
|
return 1;
|
||||||
#endif
|
#endif
|
||||||
|
2
env/common.c
vendored
2
env/common.c
vendored
@ -280,7 +280,7 @@ void env_relocate(void)
|
|||||||
set_default_env("!bad CRC");
|
set_default_env("!bad CRC");
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
env_relocate_spec();
|
env_load();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
5
env/env.c
vendored
5
env/env.c
vendored
@ -150,11 +150,6 @@ int env_init(void)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void env_relocate_spec(void)
|
|
||||||
{
|
|
||||||
env_load();
|
|
||||||
}
|
|
||||||
|
|
||||||
int saveenv(void)
|
int saveenv(void)
|
||||||
{
|
{
|
||||||
return env_save();
|
return env_save();
|
||||||
|
@ -170,8 +170,6 @@ extern env_t environment;
|
|||||||
extern const unsigned char default_environment[];
|
extern const unsigned char default_environment[];
|
||||||
extern env_t *env_ptr;
|
extern env_t *env_ptr;
|
||||||
|
|
||||||
extern void env_relocate_spec(void);
|
|
||||||
|
|
||||||
#if defined(CONFIG_NEEDS_MANUAL_RELOC)
|
#if defined(CONFIG_NEEDS_MANUAL_RELOC)
|
||||||
extern void env_reloc(void);
|
extern void env_reloc(void);
|
||||||
#endif
|
#endif
|
||||||
@ -320,6 +318,13 @@ struct env_driver *env_driver_lookup_default(void);
|
|||||||
*/
|
*/
|
||||||
int env_get_char(int index);
|
int env_get_char(int index);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* env_load() - Load the environment from storage
|
||||||
|
*
|
||||||
|
* @return 0 if OK, -ve on error
|
||||||
|
*/
|
||||||
|
int env_load(void);
|
||||||
|
|
||||||
#endif /* DO_DEPS_ONLY */
|
#endif /* DO_DEPS_ONLY */
|
||||||
|
|
||||||
#endif /* _ENVIRONMENT_H_ */
|
#endif /* _ENVIRONMENT_H_ */
|
||||||
|
Loading…
Reference in New Issue
Block a user