env: Add support for callbacks to environment vars

Add support for per-variable callbacks to the "hashtable" functions.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>

!!!fix comment in callback
This commit is contained in:
Joe Hershberger 2012-12-11 22:16:24 -06:00 committed by Tom Rini
parent be11235ab8
commit 170ab11075
10 changed files with 592 additions and 4 deletions

View file

@ -24,6 +24,8 @@
* MA 02111-1307 USA
*/
#include <env_callback.h>
#ifdef DEFAULT_ENV_INSTANCE_EMBEDDED
env_t environment __PPCENV__ = {
ENV_CRC, /* CRC Sum */
@ -36,6 +38,9 @@ static char default_environment[] = {
#else
const uchar default_environment[] = {
#endif
#ifdef CONFIG_ENV_CALLBACK_LIST_DEFAULT
ENV_CALLBACK_VAR "=" CONFIG_ENV_CALLBACK_LIST_DEFAULT "\0"
#endif
#ifdef CONFIG_BOOTARGS
"bootargs=" CONFIG_BOOTARGS "\0"
#endif