};
enum env_location {
- ENVL_DATAFLASH,
ENVL_EEPROM,
ENVL_EXT4,
ENVL_FAT,
* 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_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_ */