diff options
Diffstat (limited to 'lib/fwu_updates')
-rw-r--r-- | lib/fwu_updates/fwu.c | 4 | ||||
-rw-r--r-- | lib/fwu_updates/fwu_mtd.c | 6 |
2 files changed, 6 insertions, 4 deletions
diff --git a/lib/fwu_updates/fwu.c b/lib/fwu_updates/fwu.c index cd5c3b64773..4d0c8b84b9d 100644 --- a/lib/fwu_updates/fwu.c +++ b/lib/fwu_updates/fwu.c @@ -95,6 +95,8 @@ static int fwu_trial_count_update(void) log_err("Unable to revert active_index\n"); ret = 1; } else { + log_info("Trial State count: attempt %d out of %d\n", + trial_state_ctr, CONFIG_FWU_TRIAL_STATE_CNT); ret = trial_counter_update(&trial_state_ctr); if (ret) log_err("Unable to increment TrialStateCtr variable\n"); @@ -666,8 +668,6 @@ static int fwu_boottime_checks(void *ctx, struct event *event) ret = fwu_set_active_index(boot_idx); if (!ret) boottime_check = 1; - - return 0; } if (efi_init_obj_list() != EFI_SUCCESS) diff --git a/lib/fwu_updates/fwu_mtd.c b/lib/fwu_updates/fwu_mtd.c index b73111ae24d..69cd3d7001f 100644 --- a/lib/fwu_updates/fwu_mtd.c +++ b/lib/fwu_updates/fwu_mtd.c @@ -175,8 +175,10 @@ int fwu_gen_alt_info_from_mtd(char *buf, size_t len, struct mtd_info *mtd) l = strlen(buf); /* Replace the last ';' with '&' if there is another image. */ - if (i != CONFIG_FWU_NUM_IMAGES_PER_BANK - 1 && l) - buf[l - 1] = '&'; + if (i != CONFIG_FWU_NUM_IMAGES_PER_BANK - 1 && l) { + buf[l] = '&'; + buf++; + } len -= l; buf += l; } |