Fix some leftovers after mynewt move (PR #52)
- caps.c was now updated (missed this one!).
- *_OVERWRITE_ONLY flag was now also updated.
diff --git a/boot/bootutil/src/caps.c b/boot/bootutil/src/caps.c
index ae67939..61d4f3f 100644
--- a/boot/bootutil/src/caps.c
+++ b/boot/bootutil/src/caps.c
@@ -20,16 +20,16 @@
{
uint32_t res = 0;
-#ifdef BOOTUTIL_SIGN_RSA
+#if defined(MCUBOOT_SIGN_RSA)
res |= BOOTUTIL_CAP_RSA2048;
#endif
-#ifdef BOOTUTIL_SIGN_EC
+#if defined(MCUBOOT_SIGN_EC)
res |= BOOTUTIL_CAP_ECDSA_P224;
#endif
-#ifdef BOOTUTIL_SIGN_EC256
+#if defined(MCUBOOT_SIGN_EC256)
res |= BOOTUTIL_CAP_ECDSA_P256;
#endif
-#ifdef BOOTUTIL_OVERWRITE_ONLY
+#if defined(MCUBOOT_OVERWRITE_ONLY)
res |= BOOTUTIL_CAP_OVERWRITE_UPGRADE;
#else
res |= BOOTUTIL_CAP_SWAP_UPGRADE;
diff --git a/boot/bootutil/src/loader.c b/boot/bootutil/src/loader.c
index a328172..d42c40e 100644
--- a/boot/bootutil/src/loader.c
+++ b/boot/bootutil/src/loader.c
@@ -645,7 +645,7 @@
* @return The number of bytes comprised by the
* [first-sector, last-sector] range.
*/
-#ifndef BOOTUTIL_OVERWRITE_ONLY
+#ifndef MCUBOOT_OVERWRITE_ONLY
static uint32_t
boot_copy_sz(int last_sector_idx, int *out_first_sector_idx)
{
@@ -669,7 +669,7 @@
*out_first_sector_idx = i + 1;
return sz;
}
-#endif /* not BOOTUTIL_OVERWRITE_ONLY */
+#endif /* !MCUBOOT_OVERWRITE_ONLY */
/**
* Erases a region of flash.
@@ -845,7 +845,7 @@
*
* @return 0 on success; nonzero on failure.
*/
-#ifndef BOOTUTIL_OVERWRITE_ONLY
+#ifndef MCUBOOT_OVERWRITE_ONLY
static void
boot_swap_sectors(int idx, uint32_t sz, struct boot_status *bs)
{
@@ -978,7 +978,7 @@
assert(rc == 0);
}
}
-#endif /* not BOOTUTIL_OVERWRITE_ONLY */
+#endif /* !MCUBOOT_OVERWRITE_ONLY */
/**
* Swaps the two images in flash. If a prior copy operation was interrupted
@@ -992,7 +992,7 @@
*
* @return 0 on success; nonzero on failure.
*/
-#ifdef BOOTUTIL_OVERWRITE_ONLY
+#ifdef MCUBOOT_OVERWRITE_ONLY
static int
boot_copy_image(struct boot_status *bs)
{