]> git.sur5r.net Git - u-boot/commit
env: Refactor apply into change_ok
authorJoe Hershberger <joe.hershberger@ni.com>
Wed, 12 Dec 2012 04:16:21 +0000 (22:16 -0600)
committerTom Rini <trini@ti.com>
Thu, 13 Dec 2012 18:46:55 +0000 (11:46 -0700)
commit7afcf3a55b5f484b3d3442053fae8186a3fb92d7
tree1aa2c5143a1bbef6570b03652107a09832a2f2ad
parent3d3b52f2586a8bf1c53496547062594fd4386454
env: Refactor apply into change_ok

Move the read of the old value to inside the check function.  In some
cases it can be avoided all together and at the least the code is only
called from one place.

Also name the function and the callback to more clearly describe what
it does.

Pass the ENTRY instead of just the name for direct access to the whole
data structure.

Pass an enum to the callback that specifies the operation being approved.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
common/cmd_nvedit.c
common/env_common.c
include/environment.h
include/search.h
lib/hashtable.c