mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-18 13:11:31 +00:00
cmd: env: Fix CRC calculation for 'env export -c -s'
Fix failure to reimport exported checksummed, size constrained data block. 'env export -c' command ignores optional -s size argument when calculating checksum causing subsequent 'env import -c' to fail. Signed-off-by: Neil Stainton <nstainton@asl-control.co.uk>
This commit is contained in:
parent
b592936d35
commit
d71b029d1d
1 changed files with 2 additions and 1 deletions
|
@ -987,7 +987,8 @@ NXTARG: ;
|
|||
}
|
||||
|
||||
if (chk) {
|
||||
envp->crc = crc32(0, envp->data, ENV_SIZE);
|
||||
envp->crc = crc32(0, envp->data,
|
||||
size ? size - offsetof(env_t, data) : ENV_SIZE);
|
||||
#ifdef CONFIG_ENV_ADDR_REDUND
|
||||
envp->flags = ACTIVE_FLAG;
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue