Skip to content
Commit 4dc5e262 authored by Ashok Reddy Soma's avatar Ashok Reddy Soma Committed by Tom Rini
Browse files

env: Fix default environment saving issue



When CONFIG_SYS_REDUNDAND_ENVIRONMENT is enabled, by default env is
getting saved to redundant environment irrespective of primary env is
present or not.

It means even if primary and redundant environment are not present, by
default, env is getting stored to redundant environment. Even if primary
env is present, it is choosing to store in redudndant env.

Ideally it should look for primary env and choose to store in primary env
if it is present. If both primary and redundant env are not present then
it should save in to primary env area.

Fix the issue by making env_valid = ENV_INVALID when both the
environments are not present.

Signed-off-by: default avatarAshok Reddy Soma <ashok.reddy.soma@amd.com>
Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
parent 3430f24b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment