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
* will read from gd->env_addr.
*
* @index: Index of character to read (0=first)
- * @return character read
+ * @return character read, or -ve on error
*/
- unsigned char (*get_char)(int index);
+ int (*get_char)(int index);
/**
* load() - Load the environment from storage
*
* This method is optional. If not provided, no environment will be
* loaded.
+ *
+ * @return 0 if OK, -ve on error
*/
- void (*load)(void);
+ int (*load)(void);
/**
* save() - Save the environment to storage
void env_crc_update(void);
/* Look up the variable from the default environment */
-char *getenv_default(const char *name);
+char *env_get_default(const char *name);
/* [re]set to the default environment */
void set_default_env(const char *s);
*/
int env_get_char(int index);
+/**
+ * env_load() - Load the environment from storage
+ *
+ * @return 0 if OK, -ve on error
+ */
+int env_load(void);
+
+/**
+ * env_save() - Save the environment to storage
+ *
+ * @return 0 if OK, -ve on error
+ */
+int env_save(void);
+
#endif /* DO_DEPS_ONLY */
#endif /* _ENVIRONMENT_H_ */