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> Reviewed-by:
Marek Vasut <marex@denx.de>
Showing
- common/cmd_nvedit.c 2 additions, 1 deletioncommon/cmd_nvedit.c
- common/env_common.c 5 additions, 3 deletionscommon/env_common.c
- include/environment.h 9 additions, 0 deletionsinclude/environment.h
- include/search.h 13 additions, 1 deletioninclude/search.h
- lib/hashtable.c 19 additions, 1 deletionlib/hashtable.c
Please register or sign in to comment