Skip to content

Commit e3a14df

Browse files
committed
[nrf fromlist] hooks: Use dedicated type for slot numbers
Use the dedicated type to specify the slot number. Upstream PR #: 2467 Signed-off-by: Tomasz Chyrowicz <[email protected]>
1 parent a999034 commit e3a14df

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

boot/bootutil/include/bootutil/boot_hooks.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,6 @@ int flash_area_get_device_id_hook(const struct flash_area *fa,
282282
* @return 0 if a slot was requested;
283283
* BOOT_HOOK_REGULAR follow the normal execution path.
284284
*/
285-
int boot_find_next_slot_hook(struct boot_loader_state *state, uint8_t image, uint32_t *active_slot);
285+
int boot_find_next_slot_hook(struct boot_loader_state *state, uint8_t image, enum boot_slot *active_slot);
286286

287287
#endif /*H_BOOTUTIL_HOOKS*/

boot/zephyr/hooks_sample.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ int boot_img_install_stat_hook(int image_index, int slot, int *img_install_stat)
9494
return BOOT_HOOK_REGULAR;
9595
}
9696

97-
int boot_find_next_slot_hook(struct boot_loader_state *state, uint8_t image, uint32_t *active_slot)
97+
int boot_find_next_slot_hook(struct boot_loader_state *state, uint8_t image, enum boot_slot *active_slot)
9898
{
9999
return BOOT_HOOK_REGULAR;
100100
}

0 commit comments

Comments
 (0)