Commit 490365c3 authored by Andreas Fenkart's avatar Andreas Fenkart Committed by Tom Rini
Browse files

tools/env: return with error if redundant environments have unequal size

For double buffering to work, the target buffer must always be big
enough to hold all data. This can only be ensured if buffers are of
equal size, otherwise one must be smaller and we risk data loss
when copying from the bigger to the smaller buffer.
Reviewed-by: default avatarSimon Glass <>
Signed-off-by: default avatarAndreas Fenkart <>
Reviewed-by: default avatarTom Rini <>
parent c359ae5e
......@@ -1423,10 +1423,9 @@ static int parse_config(struct env_opts *opts)
return rc;
if (ENVSIZE(0) != ENVSIZE(1)) {
"Redundant environments have inequal size, set to 0x%08lx\n",
"Redundant environments have unequal size");
return -1;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment