diff options
author | Arvind Kumar <quic_c_karvin@quicinc.com> | 2022-07-11 23:42:54 +0530 |
---|---|---|
committer | Arvind Kumar <quic_c_karvin@quicinc.com> | 2022-07-12 00:12:54 +0530 |
commit | 51905b4794b21471cf74bd578256e856134478b8 (patch) | |
tree | 88e8c12c2a2bf0e73e40352db4ecb9dc5433f593 | |
parent | 8a3b7981792e5b898115d49681908e23a8366690 (diff) |
Check for full partiton name instead of partial prefix
Check for full partition name instead of partial prefix to
avoid matching with wrong partitions
Change-Id: Ia8ea4420f02dea98697165b710a1cf12e9202137
-rw-r--r-- | 1.1/libboot_control_qti/libboot_control_qti.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/1.1/libboot_control_qti/libboot_control_qti.cpp b/1.1/libboot_control_qti/libboot_control_qti.cpp index b21a958..81e7f03 100644 --- a/1.1/libboot_control_qti/libboot_control_qti.cpp +++ b/1.1/libboot_control_qti/libboot_control_qti.cpp @@ -589,10 +589,10 @@ int set_active_boot_slot(unsigned slot) for (i = 0; i < ARRAY_SIZE(ptn_list); i++) { //XBL, XBL_CFG, MULTIIMGOEM, MULTIIMGQTI 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)) - || !strncmp(ptn_list[i],PTN_MULTIIMGOEM,strlen(PTN_MULTIIMGOEM)) - || !strncmp(ptn_list[i],PTN_MULTIIMGQTI,strlen(PTN_MULTIIMGQTI)))) + if (is_ufs && (!strncmp(ptn_list[i],PTN_XBL,strlen(ptn_list[i])) + || !strncmp(ptn_list[i],PTN_XBL_CFG,strlen(ptn_list[i])) + || !strncmp(ptn_list[i],PTN_MULTIIMGOEM,strlen(ptn_list[i])) + || !strncmp(ptn_list[i],PTN_MULTIIMGQTI,strlen(ptn_list[i])))) continue; //The partition list will be the list of _a partitions string cur_ptn = ptn_list[i]; |