mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-11 07:24:46 +00:00
cmd: hash: correct parameter count check
Since commit348ea87850
("cmd: hash: fix param count check") the hash command cannot be used without the optional variable name parameter if CONFIG_HASH_VERIFY=y. 'hash sha1 $loadaddr $filesize' returns CMD_RET_USAGE. The minimum number of arguments is four no matter if verification is enabled or not. Fixes:348ea87850
("cmd: hash: fix param count check") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Igor Opaniuk <igor.opaniuk@gmail.com>
This commit is contained in:
parent
8e5e64d55d
commit
6831415e39
1 changed files with 1 additions and 1 deletions
|
@ -25,7 +25,7 @@ static int do_hash(struct cmd_tbl *cmdtp, int flag, int argc,
|
|||
char *s;
|
||||
int flags = HASH_FLAG_ENV;
|
||||
|
||||
if (argc < (HARGS - 1))
|
||||
if (argc < 4)
|
||||
return CMD_RET_USAGE;
|
||||
|
||||
#if IS_ENABLED(CONFIG_HASH_VERIFY)
|
||||
|
|
Loading…
Add table
Reference in a new issue