Since commit
348ea878508d ("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: 348ea878508d ("cmd: hash: fix param count check")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@gmail.com>
char *s;
int flags = HASH_FLAG_ENV;
- if (argc < (HARGS - 1))
+ if (argc < 4)
return CMD_RET_USAGE;
#if IS_ENABLED(CONFIG_HASH_VERIFY)