]> git.sur5r.net Git - u-boot/commit
env: add check/apply logic to himport_r()
authorGerlando Falauto <gerlando.falauto@keymile.com>
Mon, 2 Apr 2012 18:26:41 +0000 (20:26 +0200)
committerWolfgang Denk <wd@denx.de>
Mon, 13 Aug 2012 10:08:51 +0000 (12:08 +0200)
commitbdd99a7ec1d9dde4749ec214959756340c879617
tree7cb7f1998ba96e284085e30d00c475cdeb0c2c47
parent8b2c556741daa2091af2935e67c5d684b96da4de
env: add check/apply logic to himport_r()

Change hashtable so that a callback function will decide whether a
variable can be overwritten, and possibly apply the changes.

So add a new field to struct hsearch_data:

 o "apply" callback function to check whether a variable can be
    overwritten, and possibly immediately apply the changes;
    when NULL, no check is performed.

And a new argument to himport_r():
 o "do_apply": whether to call the apply callback function

NOTE: This patch does not change the current behavior.

Signed-off-by: Gerlando Falauto <gerlando.falauto@keymile.com>
common/cmd_nvedit.c
common/env_common.c
include/environment.h
include/search.h
lib/hashtable.c