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

Simon Goldschmidt sgoldschmidt at de.pepperl-fuchs.com
Wed Jan 31 13:33:04 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.

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


Pepperl+Fuchs GmbH, Mannheim
Geschaeftsfuehrer/Managing Directors: Dr.-Ing. Gunther Kegel (Vors./CEO), Werner Guthier, Mehmet Hatiboglu
Vorsitzender des Aufsichtsrats/Chairman of the supervisory board: Claus Michael
Registergericht/Register Court: AG Mannheim HRB 4713

Wichtiger Hinweis:
Diese E-Mail einschliesslich ihrer Anhaenge enthaelt vertrauliche und rechtlich geschuetzte Informationen, die nur fuer den Adressaten bestimmt sind. 
Sollten Sie nicht der bezeichnete Adressat sein, so teilen Sie dies bitte dem Absender umgehend mit und loeschen Sie diese Nachricht und ihre Anhaenge. Die unbefugte Weitergabe, das Anfertigen von Kopien und jede Veraenderung der E-Mail ist untersagt. Der Absender haftet nicht fuer Inhalte von veraenderten E-Mails.


Important Information:
This e-mail message including its attachments contains confidential and legally protected information solely intended for the addressee. If you are not the intended addressee of this message, please contact the addresser immediately and delete this message including its attachments. The unauthorized dissemination, copying and change of this e-mail are strictly forbidden. The addresser shall not be liable for the content of such changed e-mails.


More information about the U-Boot mailing list