Description: 适配 gnu-efi 4.0 的 AsciiStrLen 重复定义
 GNU-EFI 4.0 的 libefi.a（str.o）已提供 AsciiStrLen，与 refind 在
 EfiLib/gnuefi-helper.c 中的同名实现冲突，链接 refind_x64.so 时报
 "multiple definition of `AsciiStrLen'"。移除 refind 自带的冗余实现，
 改用 gnu-efi 提供的同名函数（原型仍由 gnuefi-helper.h 暴露）。
Author: tangxiaofeng <tangxiaofeng@kylinos.cn>
Forwarded: not-needed
Last-Update: 2026-09-14

--- refind-0.14.2.orig/EfiLib/gnuefi-helper.c
+++ refind-0.14.2/EfiLib/gnuefi-helper.c
@@ -93,42 +93,13 @@ UnicodeStrToAsciiStr (
   return Destination;
 }
 
-/**
-  Returns the length of a Null-terminated ASCII string.
-
-  This function returns the number of ASCII characters in the Null-terminated
-  ASCII string specified by String.
-
-  If String is NULL, then ASSERT().
-  If PcdMaximumAsciiStringLength is not zero and String contains more than
-  PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator,
-  then ASSERT().
-
-  @param  String  Pointer to a Null-terminated ASCII string.
-
-  @return The length of String.
-
-**/
-UINTN
-AsciiStrLen (
-  IN      CONST CHAR8               *String
-  )
-{
-  UINTN                             Length;
-
-  ASSERT (String != NULL);
-
-  for (Length = 0; *String != '\0'; String++, Length++) {
-//     //
-//     // If PcdMaximumUnicodeStringLength is not zero,
-//     // length should not more than PcdMaximumUnicodeStringLength
-//     //
-//     if (PcdGet32 (PcdMaximumAsciiStringLength) != 0) {
-//       ASSERT (Length < PcdGet32 (PcdMaximumAsciiStringLength));
-//     }
-  }
-  return Length;
-}
+/*
+  NOTE: AsciiStrLen() used to be defined here, but GNU-EFI 4.0 provides the
+  identical function (libefi.a / str.o, declared in efilib.h), so keeping this
+  copy made the final link fail with "multiple definition of `AsciiStrLen'".
+  The prototype is still exposed through gnuefi-helper.h; only the redundant
+  definition was dropped.
+*/
 
 /**
   Determine whether a given device path is valid.
