This patchset modifies the handling of all the operations on the environment (set/import/default) so to unify handling of special variables. On top of that we implement a selective "env default".
A selective "env import" would imply a user API change and should therefore be discussed separately. NOTE: The entire patchset generates an increase in code size of about 1200 bytes on a PowerPC target. As much as I would like to get rid of the set_default_vars() function in env_common.c, I have not found a nice way to do so. Changes in the syntax (user API): - "env default" -f: override write-once variables, -a means all - display a warning when trying to set to default variables not present in the default env. Changes from v3: - rebased to current trunk (was not compilable) - removed compiler warnings - added an independent cosmetic patch on top of the series (from which only a later patch would actually benefit) Changes from v2: - removed typedef for callback, moved to the hashtable (struct hsearch_data) - refactored patchset into smaller patches (only patch 5 and 6 should have any visible effect) - added handling of selected variables not present in the imported env - removed CONFIG_CMD_DEFAULTENV_VARS - cosmetic formatting Changes from v1: - removed cosmetic patches (now mainstream) - rebased to latest trunk - removed subtle error in env_check_apply (comparing {loadaddr, bootfile} to values instead of variable names) - changed env_check_apply so not to display warnings in case of H_FORCE flag being set Changes from v0 - checkpatch cleanup - removed himport_ex() - removed warning for serial_assign() - env import NOT implemented here Gerlando Falauto (7): env: cosmetic: drop assignment i = iomux_doenv() env: unify logic to check and apply changes env: make himport_r() selective on variables env: add check/apply logic to himport_r() env: check and apply changes on delete/destroy env: make "env default" selective, check and apply env: delete selected vars not present in imported env common/cmd_nvedit.c | 190 ++++++++++++++++++++++++++++++++++--------------- common/env_common.c | 36 +++++++++- include/environment.h | 12 ++++ include/search.h | 26 +++++-- lib/hashtable.c | 95 +++++++++++++++++++++++-- 5 files changed, 286 insertions(+), 73 deletions(-) -- 1.7.10.4 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot