FatPkg/EnhancedFatDxe: Remove Iso639Language

PR #11380 that removed the Unicode Collation Protocol
introduced a logic bug in the use of GetBestLanguage().
Iso639Language would always be computed to TRUE when it
should always be passed to GetBestLanguage() as FALSE
once Unicode Collation Protocol is removed.

Update InitializeUnicodeCollationSupportWorker() to
remove the local variable Iso639Language and always
call GetBestLanguage() with the Iso639Language parameter
set to FALSE.

Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
This commit is contained in:
Michael D Kinney 2025-10-13 16:11:42 -07:00 committed by mergify[bot]
parent aace3eebd2
commit 56989e2d24

View file

@ -40,7 +40,6 @@ InitializeUnicodeCollationSupportWorker (
UINTN Index;
EFI_HANDLE *Handles;
EFI_UNICODE_COLLATION_PROTOCOL *Uci;
BOOLEAN Iso639Language;
CHAR8 *Language;
CHAR8 *BestLanguage;
@ -55,7 +54,6 @@ InitializeUnicodeCollationSupportWorker (
return Status;
}
Iso639Language = (BOOLEAN)(ProtocolGuid == &gEfiUnicodeCollation2ProtocolGuid);
GetEfiGlobalVariable2 (VariableName, (VOID **)&Language, NULL);
ReturnStatus = EFI_UNSUPPORTED;
@ -81,7 +79,7 @@ InitializeUnicodeCollationSupportWorker (
//
BestLanguage = GetBestLanguage (
Uci->SupportedLanguages,
Iso639Language,
FALSE,
(Language == NULL) ? "" : Language,
DefaultLanguage,
NULL