From 1967ec2c79c15ab1ad6390dae9e978d2cbf147c8 Mon Sep 17 00:00:00 2001 From: Luofan Chen Date: Wed, 24 May 2023 23:56:36 +0800 Subject: [PATCH] sm8350-common: gpt-utils: Check ufs device first before checking partition names - https://git.codelinaro.org/clo/la/platform/hardware/qcom/bootctrl/-/commit/4b6405a7f0b4d52e6266683ba49c3e83c5b16e32 Change-Id: I51663ff8e074681191ac708fcd7b4d28e890deaf --- gpt-utils/gpt-utils.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gpt-utils/gpt-utils.cpp b/gpt-utils/gpt-utils.cpp index 29ffb7d..760052f 100644 --- a/gpt-utils/gpt-utils.cpp +++ b/gpt-utils/gpt-utils.cpp @@ -241,9 +241,9 @@ static int gpt_boot_chain_swap(const uint8_t *pentries_start, uint8_t ptn_swap[PTN_ENTRY_SIZE]; //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))) + || !strncmp(ptn_swap_list[i],PTN_MULTIIMGQTI,strlen(PTN_MULTIIMGQTI)))) continue; ptn_entry = gpt_pentry_seek(ptn_swap_list[i], pentries_start,