diff options
Diffstat (limited to 'boot_control.cpp')
-rw-r--r-- | boot_control.cpp | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/boot_control.cpp b/boot_control.cpp index 539c52c..7319f9a 100644 --- a/boot_control.cpp +++ b/boot_control.cpp @@ -464,7 +464,8 @@ static int boot_ctl_set_active_slot_for_partitions(vector<string> part_list, memcpy((void*)inactive_guid, (const void*)pentryA, TYPE_GUID_SIZE); } else { - ALOGE("Both A & B are inactive..Aborting"); + ALOGE("Both A & B for %s are inactive..Aborting", + prefix.c_str()); goto error; } if (!strncmp(slot_suffix_arr[slot], AB_SLOT_A_SUFFIX, @@ -536,8 +537,14 @@ int set_active_boot_slot(struct boot_control_module *module, unsigned slot) //actual names. To do this we append the slot suffix to every member //in the list. for (i = 0; i < ARRAY_SIZE(ptn_list); i++) { - //XBL is handled differrently for ufs devices so ignore it - if (is_ufs && !strncmp(ptn_list[i], PTN_XBL, strlen(PTN_XBL))) + //XBL & XBL_CFG are handled differrently for ufs devices so + //ignore them + if (is_ufs && (!strncmp(ptn_list[i], + PTN_XBL, + strlen(PTN_XBL)) + || !strncmp(ptn_list[i], + PTN_XBL_CFG, + strlen(PTN_XBL_CFG)))) continue; //The partition list will be the list of _a partitions string cur_ptn = ptn_list[i]; @@ -560,7 +567,11 @@ int set_active_boot_slot(struct boot_control_module *module, unsigned slot) for (map_iter = ptn_map.begin(); map_iter != ptn_map.end(); map_iter++){ if (map_iter->second.size() < 1) continue; - boot_ctl_set_active_slot_for_partitions(map_iter->second, slot); + if (boot_ctl_set_active_slot_for_partitions(map_iter->second, + slot)) { + ALOGE("%s: Failed to set active slot", __func__); + goto error; + } } if (is_ufs) { if (!strncmp(slot_suffix_arr[slot], AB_SLOT_A_SUFFIX, |