Skip to content

Commit aa01f6e

Browse files
jpbland1danielinux
authored andcommitted
move disable backup flag to correct spot
1 parent 3b0b025 commit aa01f6e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: src/update_flash.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -493,18 +493,18 @@ static int wolfBoot_delta_update(struct wolfBoot_image *boot,
493493
wb_flash_erase(boot, sector * WOLFBOOT_SECTOR_SIZE, WOLFBOOT_SECTOR_SIZE);
494494
sector++;
495495
}
496-
#ifndef DISABLE_BACKUP
497-
#endif
498496
out:
499497
#ifdef EXT_FLASH
500498
ext_flash_lock();
501499
#endif
502500
hal_flash_lock();
503501
/* start re-entrant final erase, return code is only for resumption in
504502
* wolfBoot_start */
503+
#ifndef DISABLE_BACKUP
505504
if (ret == 0) {
506505
wolfBoot_swap_and_final_erase(0);
507506
}
507+
#endif
508508
/* encryption key was not erased, will be erased by success */
509509
return ret;
510510
}

0 commit comments

Comments
 (0)