bootutil; don't stop swapping images if writes to update status file start failing.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/06788912 Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/06788912 Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/06788912 Branch: refs/heads/master Commit: 0678891276a4bc4b8900dd9321ada2c2afcbec09 Parents: 251ba7a Author: Marko Kiiskila <ma...@runtime.io> Authored: Thu Jun 30 13:59:31 2016 -0700 Committer: Marko Kiiskila <ma...@runtime.io> Committed: Thu Jun 30 14:00:29 2016 -0700 ---------------------------------------------------------------------- libs/bootutil/src/loader.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/06788912/libs/bootutil/src/loader.c ---------------------------------------------------------------------- diff --git a/libs/bootutil/src/loader.c b/libs/bootutil/src/loader.c index f155779..bd7fbd8 100644 --- a/libs/bootutil/src/loader.c +++ b/libs/bootutil/src/loader.c @@ -284,10 +284,7 @@ boot_swap_areas(int idx, uint32_t sz) } boot_state.state = BOOT_PERSIST(idx, 1); - rc = boot_write_status(&boot_state); - if (rc != 0) { - return rc; - } + (void)boot_write_status(&boot_state); state = 1; } if (state == 1) { @@ -302,10 +299,7 @@ boot_swap_areas(int idx, uint32_t sz) } boot_state.state = BOOT_PERSIST(idx, 2); - rc = boot_write_status(&boot_state); - if (rc != 0) { - return rc; - } + (void)boot_write_status(&boot_state); state = 2; } if (state == 2) { @@ -320,10 +314,7 @@ boot_swap_areas(int idx, uint32_t sz) } boot_state.state = BOOT_PERSIST(idx + 1, 0); - rc = boot_write_status(&boot_state); - if (rc != 0) { - return rc; - } + (void)boot_write_status(&boot_state); state = 3; } return 0;