From: Tom Rini Date: Thu, 14 Nov 2024 16:49:30 +0000 (-0600) Subject: Merge patch series "cmd: hash: correct parameter count check" X-Git-Url: http://git.dujemihanovic.xyz/%22http:/www.sics.se/static/git-favicon.png?a=commitdiff_plain;h=f6ee67126492f07d400d677e82467de3f8ad2bda;p=u-boot.git Merge patch series "cmd: hash: correct parameter count check" Heinrich Schuchardt says: 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. Fix the parameter check. Provide a unit test. Link: https://lore.kernel.org/r/20241102100836.103005-1-heinrich.schuchardt@canonical.com --- f6ee67126492f07d400d677e82467de3f8ad2bda diff --cc test/cmd/Makefile index 5e4a2040d6,1fd3e89eff..583e7c2eec --- a/test/cmd/Makefile +++ b/test/cmd/Makefile @@@ -16,9 -15,9 +16,10 @@@ obj-y += exit.o mem. obj-$(CONFIG_X86) += cpuid.o msr.o obj-$(CONFIG_CMD_ADDRMAP) += addrmap.o obj-$(CONFIG_CMD_BDI) += bdinfo.o +obj-$(CONFIG_COREBOOT_SYSINFO) += coreboot.o obj-$(CONFIG_CMD_FDT) += fdt.o obj-$(CONFIG_CONSOLE_TRUETYPE) += font.o + obj-$(CONFIG_CMD_HASH) += hash.o obj-$(CONFIG_CMD_HISTORY) += history.o obj-$(CONFIG_CMD_LOADM) += loadm.o obj-$(CONFIG_CMD_MEMINFO) += meminfo.o