@@ -209,7 +209,7 @@ int boot_header_scramble_off_sz(const struct flash_area *fa, int slot, size_t *o
209
209
/* In case of swap offset, header of secondary slot image is positioned
210
210
* in second sector of slot.
211
211
*/
212
- if (slot == BOOT_SECONDARY_SLOT ) {
212
+ if (slot == BOOT_SLOT_SECONDARY ) {
213
213
ret = flash_area_get_sector (fa , 0 , & sector );
214
214
if (ret < 0 ) {
215
215
return ret ;
@@ -316,7 +316,7 @@ boot_find_status(const struct boot_loader_state *state, int image_index)
316
316
#if MCUBOOT_SWAP_USING_SCRATCH
317
317
state -> scratch .area ,
318
318
#endif
319
- state -> imgs [image_index ][BOOT_PRIMARY_SLOT ].area ,
319
+ state -> imgs [image_index ][BOOT_SLOT_PRIMARY ].area ,
320
320
};
321
321
unsigned int i ;
322
322
@@ -470,7 +470,7 @@ boot_read_image_size(struct boot_loader_state *state, int slot, uint32_t *size)
470
470
uint32_t protect_tlv_size ;
471
471
int rc ;
472
472
473
- assert (slot == BOOT_PRIMARY_SLOT || slot == BOOT_SECONDARY_SLOT );
473
+ assert (slot == BOOT_SLOT_PRIMARY || slot == BOOT_SLOT_SECONDARY );
474
474
475
475
fap = BOOT_IMG_AREA (state , slot );
476
476
assert (fap != NULL );
@@ -636,12 +636,12 @@ boot_initialize_area(struct boot_loader_state *state, int flash_area)
636
636
num_sectors = BOOT_MAX_IMG_SECTORS ;
637
637
638
638
if (flash_area == FLASH_AREA_IMAGE_PRIMARY (BOOT_CURR_IMG (state ))) {
639
- out_sectors = BOOT_IMG (state , BOOT_PRIMARY_SLOT ).sectors ;
640
- out_num_sectors = & BOOT_IMG (state , BOOT_PRIMARY_SLOT ).num_sectors ;
639
+ out_sectors = BOOT_IMG (state , BOOT_SLOT_PRIMARY ).sectors ;
640
+ out_num_sectors = & BOOT_IMG (state , BOOT_SLOT_PRIMARY ).num_sectors ;
641
641
#if BOOT_NUM_SLOTS > 1
642
642
} else if (flash_area == FLASH_AREA_IMAGE_SECONDARY (BOOT_CURR_IMG (state ))) {
643
- out_sectors = BOOT_IMG (state , BOOT_SECONDARY_SLOT ).sectors ;
644
- out_num_sectors = & BOOT_IMG (state , BOOT_SECONDARY_SLOT ).num_sectors ;
643
+ out_sectors = BOOT_IMG (state , BOOT_SLOT_SECONDARY ).sectors ;
644
+ out_num_sectors = & BOOT_IMG (state , BOOT_SLOT_SECONDARY ).num_sectors ;
645
645
#if MCUBOOT_SWAP_USING_SCRATCH
646
646
} else if (flash_area == FLASH_AREA_IMAGE_SCRATCH ) {
647
647
out_sectors = state -> scratch .sectors ;
@@ -677,7 +677,7 @@ boot_write_sz(struct boot_loader_state *state)
677
677
* on what the minimum write size is for scratch area, active image slot.
678
678
* We need to use the bigger of those 2 values.
679
679
*/
680
- elem_sz = flash_area_align (BOOT_IMG_AREA (state , BOOT_PRIMARY_SLOT ));
680
+ elem_sz = flash_area_align (BOOT_IMG_AREA (state , BOOT_SLOT_PRIMARY ));
681
681
#if MCUBOOT_SWAP_USING_SCRATCH
682
682
align = flash_area_align (BOOT_SCRATCH_AREA (state ));
683
683
if (align > elem_sz ) {
@@ -700,10 +700,10 @@ boot_read_sectors(struct boot_loader_state *state, struct boot_sector_buffer *se
700
700
701
701
image_index = BOOT_CURR_IMG (state );
702
702
703
- BOOT_IMG (state , BOOT_PRIMARY_SLOT ).sectors =
703
+ BOOT_IMG (state , BOOT_SLOT_PRIMARY ).sectors =
704
704
sectors -> primary [image_index ];
705
705
#if BOOT_NUM_SLOTS > 1
706
- BOOT_IMG (state , BOOT_SECONDARY_SLOT ).sectors =
706
+ BOOT_IMG (state , BOOT_SLOT_SECONDARY ).sectors =
707
707
sectors -> secondary [image_index ];
708
708
#if MCUBOOT_SWAP_USING_SCRATCH
709
709
state -> scratch .sectors = sectors -> scratch ;
@@ -780,10 +780,10 @@ void boot_fetch_slot_state_sizes(void)
780
780
781
781
image_index = BOOT_CURR_IMG (boot_get_loader_state ());
782
782
783
- BOOT_IMG (boot_get_loader_state (), BOOT_PRIMARY_SLOT ).sectors =
783
+ BOOT_IMG (boot_get_loader_state (), BOOT_SLOT_PRIMARY ).sectors =
784
784
sector_buffers .primary [image_index ];
785
785
#if BOOT_NUM_SLOTS > 1
786
- BOOT_IMG (boot_get_loader_state (), BOOT_SECONDARY_SLOT ).sectors =
786
+ BOOT_IMG (boot_get_loader_state (), BOOT_SLOT_SECONDARY ).sectors =
787
787
sector_buffers .secondary [image_index ];
788
788
#if MCUBOOT_SWAP_USING_SCRATCH
789
789
boot_get_loader_state ()-> scratch .sectors = sector_buffers .scratch ;
0 commit comments