Skip to content

Commit c551e45

Browse files
committed
bootutil: Move primary/secondary slot definition to bootutil_public
The slots definitions (BOOT_PRIMARY_SLOT, BOOT_SECONDARY_SLOT) were defined in bootutil_priv.h, which made them unusable for bootloader requests. This commit moves them to bootutil_public.h Signed-off-by: Artur Hadasz <[email protected]>
1 parent fe8f9fc commit c551e45

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

boot/bootutil/include/bootutil/bootutil_public.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,11 @@ _Static_assert(MCUBOOT_BOOT_MAX_ALIGN >= 8 && MCUBOOT_BOOT_MAX_ALIGN <= 32,
129129
(swap_info) = (image) << 4 \
130130
| (type); \
131131
}
132+
133+
#define BOOT_PRIMARY_SLOT 0
134+
#define BOOT_SECONDARY_SLOT 1
135+
#define BOOT_SLOT_COUNT 2
136+
132137
#ifdef MCUBOOT_HAVE_ASSERT_H
133138
#include "mcuboot_config/mcuboot_assert.h"
134139
#else

boot/bootutil/src/bootutil_priv.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,9 +222,6 @@ _Static_assert(sizeof(boot_img_magic) == BOOT_MAGIC_SZ, "Invalid size for image
222222
/** Maximum number of image sectors supported by the bootloader. */
223223
#define BOOT_STATUS_MAX_ENTRIES BOOT_MAX_IMG_SECTORS
224224

225-
#define BOOT_PRIMARY_SLOT 0
226-
#define BOOT_SECONDARY_SLOT 1
227-
228225
#define BOOT_STATUS_SOURCE_NONE 0
229226
#define BOOT_STATUS_SOURCE_SCRATCH 1
230227
#define BOOT_STATUS_SOURCE_PRIMARY_SLOT 2

0 commit comments

Comments
 (0)