]> git.proxmox.com Git - mirror_edk2.git/blobdiff - FatPkg/EnhancedFatDxe/UnicodeCollation.c
BaseTools: Library hashing fix and optimization for --hash feature
[mirror_edk2.git] / FatPkg / EnhancedFatDxe / UnicodeCollation.c
index 69d9eaf405eb1b3874bac38ef3ee1f30d6fc3f86..9b22e05bc320f4846fab394fbf4ad8a23bee0220 100644 (file)
@@ -2,14 +2,8 @@
   Unicode Collation Support component that hides the trivial difference of Unicode Collation\r
   and Unicode collation 2 Protocol.\r
 \r
-  Copyright (c) 2007 - 2009, Intel Corporation<BR>\r
-  All rights reserved. This program and the accompanying materials\r
-  are licensed and made available under the terms and conditions of the BSD License\r
-  which accompanies this distribution.  The full text of the license may be found at\r
-  http://opensource.org/licenses/bsd-license.php\r
-\r
-  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+  Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
+  SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
@@ -40,6 +34,7 @@ InitializeUnicodeCollationSupportWorker (
   IN CONST CHAR8        *DefaultLanguage\r
   )\r
 {\r
+  EFI_STATUS                      ReturnStatus;\r
   EFI_STATUS                      Status;\r
   UINTN                           NumHandles;\r
   UINTN                           Index;\r
@@ -61,9 +56,9 @@ InitializeUnicodeCollationSupportWorker (
   }\r
 \r
   Iso639Language = (BOOLEAN) (ProtocolGuid == &gEfiUnicodeCollationProtocolGuid);\r
-  Language = GetEfiGlobalVariable(VariableName);\r
+  GetEfiGlobalVariable2 (VariableName, (VOID**) &Language, NULL);\r
 \r
-  Status = EFI_UNSUPPORTED;\r
+  ReturnStatus = EFI_UNSUPPORTED;\r
   for (Index = 0; Index < NumHandles; Index++) {\r
     //\r
     // Open Unicode Collation Protocol\r
@@ -82,7 +77,7 @@ InitializeUnicodeCollationSupportWorker (
 \r
     //\r
     // Find the best matching matching language from the supported languages\r
-    // of Unicode Collation (2) protocol. \r
+    // of Unicode Collation (2) protocol.\r
     //\r
     BestLanguage = GetBestLanguage (\r
                      Uci->SupportedLanguages,\r
@@ -94,7 +89,7 @@ InitializeUnicodeCollationSupportWorker (
     if (BestLanguage != NULL) {\r
       FreePool (BestLanguage);\r
       mUnicodeCollationInterface = Uci;\r
-      Status = EFI_SUCCESS;\r
+      ReturnStatus = EFI_SUCCESS;\r
       break;\r
     }\r
   }\r
@@ -105,7 +100,7 @@ InitializeUnicodeCollationSupportWorker (
 \r
   FreePool (Handles);\r
 \r
-  return Status;\r
+  return ReturnStatus;\r
 }\r
 \r
 /**\r
@@ -188,9 +183,8 @@ FatStriCmp (
 /**\r
   Uppercase a string.\r
 \r
-  @param  Str                   The string which will be upper-cased.\r
+  @param  String                   The string which will be upper-cased.\r
 \r
-  @return None.\r
 \r
 **/\r
 VOID\r
@@ -208,9 +202,8 @@ FatStrUpr (
 /**\r
   Lowercase a string\r
 \r
-  @param  Str                   The string which will be lower-cased.\r
+  @param  String                   The string which will be lower-cased.\r
 \r
-  @return None\r
 \r
 **/\r
 VOID\r