Skip to content

Commit

Permalink
fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jpbland1 committed Dec 9, 2024
1 parent 3608cac commit ef5ef95
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/libwolfboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ static int RAMFUNCTION nvm_select_fresh_sector(int part)
}
}
finish:
/* Erase the non-selected partition */
/* Erase the non-selected partition, requires unlocked flash */
addrErase -= WOLFBOOT_SECTOR_SIZE * (!sel);
if (*((uint32_t*)(addrErase + WOLFBOOT_SECTOR_SIZE - sizeof(uint32_t)))
!= FLASH_WORD_ERASED) {
Expand Down
4 changes: 2 additions & 2 deletions src/update_flash.c
Original file line number Diff line number Diff line change
Expand Up @@ -947,7 +947,8 @@ void RAMFUNCTION wolfBoot_start(void)
#endif

#ifdef NVM_FLASH_WRITEONCE
/* nvm_select_fresh_sector needs unlocked flash in cases where */
/* nvm_select_fresh_sector needs unlocked flash in cases where the unused
* sector needs to be erased */
hal_flash_unlock();
#ifdef EXT_FLASH
ext_flash_unlock();
Expand All @@ -958,7 +959,6 @@ void RAMFUNCTION wolfBoot_start(void)
updateRet = wolfBoot_get_partition_state(PART_UPDATE, &updateState);

#ifdef NVM_FLASH_WRITEONCE
/* nvm_select_fresh_sector needs unlocked flash in cases where */
hal_flash_lock();
#ifdef EXT_FLASH
ext_flash_lock();
Expand Down

0 comments on commit ef5ef95

Please sign in to comment.