#ifdef CONFIG_SPL_ENV_SUPPORT
env_init();
- env_relocate_spec();
+ env_load();
if (getenv_yesno("boot_os") != 1)
return 1;
#endif
debug("%s\n", __func__);
#ifdef CONFIG_SPL_ENV_SUPPORT
env_init();
- env_relocate_spec();
+ env_load();
debug("boot_os=%s\n", getenv("boot_os"));
if (getenv_yesno("boot_os") == 1)
ret = 0;
#ifdef CONFIG_SPL_ENV_SUPPORT
env_init();
- env_relocate_spec();
+ env_load();
if (getenv_yesno("boot_os") != 1)
return 1;
#endif
#ifdef CONFIG_SPL_ENV_SUPPORT
env_init();
- env_relocate_spec();
+ env_load();
if (getenv_yesno("boot_os") != 1)
return 1;
#endif
#ifdef CONFIG_SPL_ENV_SUPPORT
env_init();
- env_relocate_spec();
+ env_load();
if (getenv_yesno("boot_os") != 1)
return 1;
#endif
#ifdef CONFIG_SPL_ENV_SUPPORT
env_init();
- env_relocate_spec();
+ env_load();
if (getenv_yesno("boot_os") != 1)
return 1;
#endif
set_default_env("!bad CRC");
#endif
} else {
- env_relocate_spec();
+ env_load();
}
}
return 0;
}
-void env_relocate_spec(void)
-{
- env_load();
-}
-
int saveenv(void)
{
return env_save();
extern const unsigned char default_environment[];
extern env_t *env_ptr;
-extern void env_relocate_spec(void);
-
#if defined(CONFIG_NEEDS_MANUAL_RELOC)
extern void env_reloc(void);
#endif
*/
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 /* _ENVIRONMENT_H_ */