mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-18 13:11:31 +00:00
Fix broken verify functionality in crc32 command
Introduced in change d20a40de9d
"Roll crc32 into hash infrastructure"
The crc32 command with no -v expects an optional 3rd argument to be an
address to store the result in. With the -v switch, the last argument
is a crc, not an address. In the case where -v is set, we should set the
HASH_FLAG_ENV flag since that will first look for the value to be a
digest value, which matches the expected API for the crc32 command.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
849337bb22
commit
a69bdba9c6
1 changed files with 1 additions and 1 deletions
|
@ -1227,7 +1227,7 @@ static int do_mem_crc(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
|||
ac = argc - 1;
|
||||
#ifdef CONFIG_HASH_VERIFY
|
||||
if (strcmp(*av, "-v") == 0) {
|
||||
flags |= HASH_FLAG_VERIFY;
|
||||
flags |= HASH_FLAG_VERIFY | HASH_FLAG_ENV;
|
||||
av++;
|
||||
ac--;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue