verify_image: print out a statement that there are no further errors
It is useful to know that the printed errors are *all* the errors there were. Added missing error handling(found by inspection). Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
This commit is contained in:
parent
c49d4c9f7f
commit
bfa34f88f8
|
@ -2703,7 +2703,12 @@ static COMMAND_HELPER(handle_verify_image_command_internal, int verify)
|
||||||
if (verify)
|
if (verify)
|
||||||
{
|
{
|
||||||
/* calculate checksum of image */
|
/* calculate checksum of image */
|
||||||
image_calculate_checksum(buffer, buf_cnt, &checksum);
|
retval = image_calculate_checksum(buffer, buf_cnt, &checksum);
|
||||||
|
if (retval != ERROR_OK)
|
||||||
|
{
|
||||||
|
free(buffer);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
retval = target_checksum_memory(target, image.sections[i].base_address, buf_cnt, &mem_checksum);
|
retval = target_checksum_memory(target, image.sections[i].base_address, buf_cnt, &mem_checksum);
|
||||||
if (retval != ERROR_OK)
|
if (retval != ERROR_OK)
|
||||||
|
@ -2769,6 +2774,10 @@ static COMMAND_HELPER(handle_verify_image_command_internal, int verify)
|
||||||
free(buffer);
|
free(buffer);
|
||||||
image_size += buf_cnt;
|
image_size += buf_cnt;
|
||||||
}
|
}
|
||||||
|
if (diffs > 0)
|
||||||
|
{
|
||||||
|
command_print(CMD_CTX, "No more differences found.");
|
||||||
|
}
|
||||||
done:
|
done:
|
||||||
if (diffs > 0)
|
if (diffs > 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue