summaryrefslogtreecommitdiff
path: root/README
diff options
context:
space:
mode:
authorJoe Hershberger <joe.hershberger@ni.com>2012-12-11 22:16:24 -0600
committerTom Rini <trini@ti.com>2012-12-13 11:46:55 -0700
commit170ab11075d3be56e89d6444abf1148329130f4b (patch)
treed3088ad532f4f4a0082f625ce50cfd120d6a6a1d /README
parentbe11235ab802844e12d84921a38fd8ae4ddda080 (diff)
downloadu-boot-170ab11075d3be56e89d6444abf1148329130f4b.tar.gz
u-boot-170ab11075d3be56e89d6444abf1148329130f4b.tar.bz2
u-boot-170ab11075d3be56e89d6444abf1148329130f4b.zip
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
Diffstat (limited to 'README')
-rw-r--r--README30
1 files changed, 30 insertions, 0 deletions
diff --git a/README b/README
index a80441c9b5..e00a7c2a8a 100644
--- a/README
+++ b/README
@@ -4213,6 +4213,36 @@ Please note that changes to some configuration parameters may take
only effect after the next boot (yes, that's just like Windoze :-).
+Callback functions for environment variables:
+---------------------------------------------
+
+For some environment variables, the behavior of u-boot needs to change
+when their values are changed. This functionailty allows functions to
+be associated with arbitrary variables. On creation, overwrite, or
+deletion, the callback will provide the opportunity for some side
+effect to happen or for the change to be rejected.
+
+The callbacks are named and associated with a function using the
+U_BOOT_ENV_CALLBACK macro in your board or driver code.
+
+These callbacks are associated with variables in one of two ways. The
+static list can be added to by defining CONFIG_ENV_CALLBACK_LIST_STATIC
+in the board configuration to a string that defines a list of
+associations. The list must be in the following format:
+
+ entry = variable_name[:callback_name]
+ list = entry[,list]
+
+If the callback name is not specified, then the callback is deleted.
+Spaces are also allowed anywhere in the list.
+
+Callbacks can also be associated by defining the ".callbacks" variable
+with the same list format above. Any association in ".callbacks" will
+override any association in the static list. You can define
+CONFIG_ENV_CALLBACK_LIST_DEFAULT to a list (string) to define the
+".callbacks" envirnoment variable in the default or embedded environment.
+
+
Command Line Parsing:
=====================