+STATIC BOOLEAN EFIAPI ventoy_replace_name_match(CHAR8 *pReplace, CHAR8 *pName)
+{
+ UINTN Len1, Len2;
+
+ Len1 = AsciiStrLen(pReplace);
+ Len2 = AsciiStrLen(pName);
+
+ if (Len1 == 0 || Len2 == 0)
+ {
+ return FALSE;
+ }
+
+ if (0 == AsciiStriCmp(pReplace, pName))
+ {
+ return TRUE;
+ }
+
+ if (Len1 > 2 && Len2 > 2)
+ {
+ if ((pReplace[0] != '\\') && (pName[0] == '\\') && (0 == AsciiStriCmp(pReplace, pName + 1)))
+ {
+ return TRUE;
+ }
+ }
+
+ return FALSE;
+}
+