[0/2] env: Fix "env save" to malformed environment

Message ID 20190118191904.634-1-semen.protsenko@linaro.org
Headers show
Series
  • env: Fix "env save" to malformed environment
Related show

Message

Sam Protsenko Jan. 18, 2019, 7:19 p.m.
In case when environment is malformed (e.g. zeroed out), we are not
able to save new environment to that location. Let's fix that by not
considering the location with "bad CRC" environment as not accessible.

Sam Protsenko (2):
  env: common: Return specific error code on bad CRC
  env: Fix saving environment to "bad CRC" location

 env/common.c |  4 ++--
 env/env.c    | 25 +++++++++++++++++++------
 2 files changed, 21 insertions(+), 8 deletions(-)