mirror of
https://github.com/u-boot/u-boot.git
synced 2024-11-23 12:14:32 +08:00
mkimage: do not write incorrect error message
When running 'mkimage -l' is called for a valid StarFive file an error
message "Error: invalid marker bytes" is written by the Renesas SPKG
driver.
mkimage -l may be invoked without specifying an image type. In this case
mkimage iterates over all image type drivers to find the one that matches.
None of the non-matching drivers should write an error message.
Fix the Renesas SPKG driver.
Fixes: afdfcb11f9
("tools: spkgimage: add Renesas SPKG format")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
24ca49b33a
commit
2b3b3511bd
@ -147,7 +147,8 @@ static int spkgimage_verify_header(unsigned char *ptr, int size,
|
|||||||
|
|
||||||
/* Check the marker bytes */
|
/* Check the marker bytes */
|
||||||
if (memcmp(header->marker, marker, 4)) {
|
if (memcmp(header->marker, marker, 4)) {
|
||||||
fprintf(stderr, "Error: invalid marker bytes\n");
|
if (param->type == IH_TYPE_RENESAS_SPKG)
|
||||||
|
fprintf(stderr, "Error: invalid marker bytes\n");
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user