summaryrefslogtreecommitdiff
path: root/common/env_callback.c
AgeCommit message (Collapse)Author
2016-01-04common: env: initialize scalar variablePeng Fan
Before calling hsearch_r, initialize callback entry to NULL. Coverity log: " Uninitialized scalar variable (UNINIT) uninit_use_in_call: Using uninitialized value e. Field e.callback is uninitialized when calling hsearch_r. " Reported-by: Coverity Signed-off-by: Peng Fan <peng.fan@nxp.com> Cc: Tom Rini <trini@konsulko.com> Cc: Simon Glass <sjg@chromium.org>
2015-05-21env: Allow env_attr_walk to pass a priv * to callbackJoe Hershberger
In some cases it can be helpful to have context in the callback about the calling situation. This is needed for following patches. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2014-01-14common, env: optimize boottimeHeiko Schocher
when creating the hashtable, for each environmentvariable getenv(ENV_CALLBACK_VAR) and getenv(ENV_FLAGS_VAR) is called, which costs at this point a lot of time. So call this two getenv() calls only once. Boottime on the ids8313 board without this patch: 2013-12-19 13:38:22,894: NAND: 128 MiB 2013-12-19 13:38:27,659: In: serial (~4.8 sec) Bootime with this patch on the ids8313 board: 2013-12-19 13:40:25,332: NAND: 128 MiB 2013-12-19 13:40:25,546: In: serial (~0.2 sec) Signed-off-by: Heiko Schocher <hs@denx.de> Cc: Tom Rini <trini@ti.com> Cc: Joe Hershberger <joe.hershberger@ni.com> Cc: Wolfgang Denk <wd@denx.de>
2013-07-24Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk
Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
2013-03-27env_callback: Mark find_env_callback as staticTom Rini
This is not called outside of env_callback.c so mark static, remove from <env_callback.h> Cc: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Tom Rini <trini@ti.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2012-12-13env: Add support for callbacks to environment varsJoe Hershberger
Add support for per-variable callbacks to the "hashtable" functions. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> !!!fix comment in callback