diff options
author | Siddeswar Aluganti <salugant@codeaurora.org> | 2022-03-20 19:02:04 -0300 |
---|---|---|
committer | sinanmohd <pcmsinan@gmail.com> | 2023-01-05 21:30:23 +0530 |
commit | f84b614229fb517e286de6e72c869a7ef24d8d64 (patch) | |
tree | 4c2ce231110272e9f10cb19c5427bd1729a95b41 /gpt-utils/gpt-utils.cpp | |
parent | 879002a08cc9faa1a4e8b167f579650d10e79e21 (diff) |
veux: gpt-utils: Update PTN_SWAP_LIST and handle multiimg(oem/qti),
* Update PTN_SWAP_LIST to reflect partition entry changes
to BOOT LUN and handle "multiimgoem", "multiimgqti"
partitions, similar to other BOOT LUN partitions.
Diffstat (limited to 'gpt-utils/gpt-utils.cpp')
-rw-r--r-- | gpt-utils/gpt-utils.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/gpt-utils/gpt-utils.cpp b/gpt-utils/gpt-utils.cpp index 1fe955f..9f7b349 100644 --- a/gpt-utils/gpt-utils.cpp +++ b/gpt-utils/gpt-utils.cpp @@ -239,11 +239,11 @@ static int gpt_boot_chain_swap(const uint8_t *pentries_start, uint8_t *ptn_entry; uint8_t *ptn_bak_entry; uint8_t ptn_swap[PTN_ENTRY_SIZE]; - //Skip the xbl partition on UFS devices. That is handled + //Skip the xbl, multiimgoem, multiimgqti partitions on UFS devices. That is handled //seperately. - if (gpt_utils_is_ufs_device() && !strncmp(ptn_swap_list[i], - PTN_XBL, - strlen(PTN_XBL))) + if ((gpt_utils_is_ufs_device() && !strncmp(ptn_swap_list[i],PTN_XBL,strlen(PTN_XBL))) + || !strncmp(ptn_swap_list[i],PTN_MULTIIMGOEM,strlen(PTN_MULTIIMGOEM)) + || !strncmp(ptn_swap_list[i],PTN_MULTIIMGQTI,strlen(PTN_MULTIIMGQTI))) continue; ptn_entry = gpt_pentry_seek(ptn_swap_list[i], pentries_start, @@ -970,9 +970,9 @@ int prepare_boot_update(enum boot_update_stage stage) //of being loaded based on well known GUID'S. //We take care of switching the UFS boot LUN //explicitly later on. - if (!strncmp(ptn_swap_list[i], - PTN_XBL, - strlen(PTN_XBL))) + if (!strncmp(ptn_swap_list[i],PTN_XBL,strlen(PTN_XBL)) + || !strncmp(ptn_swap_list[i],PTN_MULTIIMGOEM,strlen(PTN_MULTIIMGOEM)) + || !strncmp(ptn_swap_list[i],PTN_MULTIIMGQTI,strlen(PTN_MULTIIMGQTI))) continue; snprintf(buf, sizeof(buf), "%s/%sbak", |