[U-Boot] [PATCH v2 0/4] env: cleanups after adding multiple envs

Simon Goldschmidt sgoldschmidt at de.pepperl-fuchs.com
Wed Jan 31 13:47:09 UTC 2018


With the new code to support multiple environment drivers and
select an environment at runtime, to correctly implement fallback
when one environment fails to load (e.g. crc error), the return
value of env_import has to be propagated by all env driver's load
function.

While cleaning this up, made some other cleanups, mainly to
reduce duplicated code.

Changes from v1:
  - fixed duplicated commit message for patch 3/4
  - removed german company email footer

Simon Goldschmidt (4):
  env: make env_import(_redund) return 0 on success, not 1
  env: move more common code to env_import_redund
  env: make env drivers propagate env_import return value
  env: sf: use env_import_redund to simplify env_sf_load

 env/common.c          | 29 ++++++++++++++++++----
 env/eeprom.c          |  4 +--
 env/ext4.c            |  3 +--
 env/fat.c             |  3 +--
 env/flash.c           |  4 +--
 env/mmc.c             | 26 +++----------------
 env/nand.c            | 24 +++---------------
 env/nvram.c           |  4 +--
 env/onenand.c         |  4 +--
 env/remote.c          |  2 +-
 env/sata.c            |  4 +--
 env/sf.c              | 69 +++++++--------------------------------------------
 env/ubi.c             | 22 ++++++++--------
 include/environment.h |  3 ++-
 14 files changed, 61 insertions(+), 140 deletions(-)

-- 
2.11.0



More information about the U-Boot mailing list