]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - include/environment.h
configs: k2g_evm: Remove PMMC loading environment commands
[people/ms/u-boot.git] / include / environment.h
index 1df243462e9d9b4626563a2ff00160b54d1d82bb..03b41e0c51160d295b17f4764abfb4cb6dff312e 100644 (file)
@@ -170,8 +170,6 @@ extern env_t environment;
 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
@@ -229,17 +227,19 @@ struct env_driver {
         * 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
@@ -284,7 +284,7 @@ extern struct hsearch_data env_htab;
 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);
@@ -320,6 +320,20 @@ struct env_driver *env_driver_lookup_default(void);
  */
 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_ */