From aa01f6e41cef40931893d527a9dd6c427c22154f Mon Sep 17 00:00:00 2001 From: John Bland Date: Tue, 17 Dec 2024 08:19:40 -0500 Subject: [PATCH] move disable backup flag to correct spot --- src/update_flash.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/update_flash.c b/src/update_flash.c index ca2cf4f5..914b0b48 100644 --- a/src/update_flash.c +++ b/src/update_flash.c @@ -493,8 +493,6 @@ static int wolfBoot_delta_update(struct wolfBoot_image *boot, wb_flash_erase(boot, sector * WOLFBOOT_SECTOR_SIZE, WOLFBOOT_SECTOR_SIZE); sector++; } -#ifndef DISABLE_BACKUP -#endif out: #ifdef EXT_FLASH ext_flash_lock(); @@ -502,9 +500,11 @@ static int wolfBoot_delta_update(struct wolfBoot_image *boot, hal_flash_lock(); /* start re-entrant final erase, return code is only for resumption in * wolfBoot_start */ +#ifndef DISABLE_BACKUP if (ret == 0) { wolfBoot_swap_and_final_erase(0); } +#endif /* encryption key was not erased, will be erased by success */ return ret; }