Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First sector fail fix #342

Merged
merged 4 commits into from
Aug 15, 2023
Merged

First sector fail fix #342

merged 4 commits into from
Aug 15, 2023

Conversation

jpbland1
Copy link
Contributor

ZD 15415

test, this will cause the test to fail since a power failure here means the fw_size of boot will be missing
are swapped and therefore the fw_sizes are wrong
@jpbland1 jpbland1 requested a review from dgarske August 15, 2023 18:48
@jpbland1 jpbland1 marked this pull request as ready for review August 15, 2023 18:48
@jpbland1 jpbland1 self-assigned this Aug 15, 2023
@jpbland1 jpbland1 force-pushed the first-sector-fail branch 2 times, most recently from b19d256 to d4231f8 Compare August 15, 2023 18:58
src/update_flash.c Show resolved Hide resolved
/* Use biggest size for the swap */
total_size = boot->fw_size + IMAGE_HEADER_SIZE;
if ((update->fw_size + IMAGE_HEADER_SIZE) > total_size)
total_size = update->fw_size + IMAGE_HEADER_SIZE;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix indent.

@@ -361,6 +361,19 @@ static int wolfBoot_delta_update(struct wolfBoot_image *boot,
#define MAX_UPDATE_SIZE (size_t)((WOLFBOOT_PARTITION_SIZE - (2 *WOLFBOOT_SECTOR_SIZE)))
#endif

static int RAMFUNCTION wolfBoot_get_total_size(struct wolfBoot_image* boot,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we just make this inline and remove the RAMFUNCTION? static inline int?

@dgarske dgarske merged commit 40bbd74 into wolfSSL:master Aug 15, 2023
42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants