gpt-utils: Check ufs device first before checking partition names
Change-Id: I51663ff8e074681191ac708fcd7b4d28e890deaf
diff --git a/gpt-utils/gpt-utils.cpp b/gpt-utils/gpt-utils.cpp
index 8167792..1a2b0e0 100644
--- a/gpt-utils/gpt-utils.cpp
+++ b/gpt-utils/gpt-utils.cpp
@@ -241,9 +241,9 @@
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,