Skip to content

Commit d142426

Browse files
committed
Fixed 'backup disabled' case without ELF_SCATTERED
1 parent 386a172 commit d142426

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/update_flash.c

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -814,11 +814,14 @@ static int RAMFUNCTION wolfBoot_update(int fallback_allowed)
814814
* wolfBoot_start*/
815815
wolfBoot_swap_and_final_erase(0);
816816

817-
#else /* DISABLE_BACKUP */ /* Compute and verify scattered hash */
818-
if (wolfBoot_verify_scattered_hash(&boot) != 0) {
819-
wolfBoot_printf("Scattered hash verification failed\n");
820-
return -1;
821-
}
817+
#else /* DISABLE_BACKUP */
818+
#ifdef ELF_SCATTERED
819+
/* Compute and verify scattered hash */
820+
if (wolfBoot_verify_scattered_hash(&boot) != 0) {
821+
wolfBoot_printf("Scattered hash verification failed\n");
822+
return -1;
823+
}
824+
#endif
822825
/* Direct Swap without power fail safety */
823826

824827
hal_flash_unlock();

0 commit comments

Comments
 (0)