X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=include%2Fenvironment.h;h=e8b6e45c3372b73f17d4d0bff7d43896d713b05c;hb=7816f2cf813326505970922021b3ed6490863e78;hp=fbccf6ab0c442745ed194a18d62bcbeb70693ad7;hpb=cb8f0317295482b1a48802778a6927510cb145ba;p=u-boot diff --git a/include/environment.h b/include/environment.h index fbccf6ab0c..e8b6e45c33 100644 --- a/include/environment.h +++ b/include/environment.h @@ -107,7 +107,8 @@ extern unsigned long nand_env_oob_offset; #ifdef CONFIG_ENV_IS_EMBEDDED # if !defined(CONFIG_ENV_IS_IN_FLASH) && \ !defined(CONFIG_ENV_IS_IN_NAND) && \ - !defined(CONFIG_ENV_IS_IN_ONENAND) + !defined(CONFIG_ENV_IS_IN_ONENAND) && \ + !defined(CONFIG_ENV_IS_IN_SPI_FLASH) # error "CONFIG_ENV_IS_EMBEDDED not supported for your flash type" # endif #endif @@ -149,17 +150,28 @@ typedef struct environment_s { unsigned char data[ENV_SIZE]; /* Environment data */ } env_t; +#ifndef DO_DEPS_ONLY + +#include + +extern struct hsearch_data env_htab; + /* Function that returns a character from the environment */ unsigned char env_get_char (int); /* Function that returns a pointer to a value from the environment */ -unsigned char *env_get_addr(int); +const unsigned char *env_get_addr(int); unsigned char env_get_char_memory (int index); /* Function that updates CRC of the enironment */ void env_crc_update (void); /* [re]set to the default environment */ -void set_default_env(void); +void set_default_env(const char *s); + +/* Import from binary representation into hash table */ +int env_import(const char *buf, int check); + +#endif #endif /* _ENVIRONMENT_H_ */