]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/HiiDatabase.c
Merge branch 'master' of https://github.com/tianocore/edk2
[mirror_edk2.git] / EdkCompatibilityPkg / Compatibility / FrameworkHiiOnUefiHiiThunk / HiiDatabase.c
index ec7159b60b82476f076d2b9c988f5f7e4eb7e443..2d456da3035392c2548552a272dd2e370d3d9ea9 100644 (file)
@@ -1,9 +1,9 @@
-/**@file\r
+/** @file\r
 Framework to UEFI 2.1 HII Thunk. The driver consume UEFI HII protocols\r
 to produce a Framework HII protocol.\r
 \r
-Copyright (c) 2008, Intel Corporation\r
-All rights reserved. This program and the accompanying materials\r
+Copyright (c) 2008 - 2014, Intel Corporation. All rights reserved.<BR>\r
+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
@@ -158,6 +158,7 @@ InitializeHiiDatabase (
 \r
   Status = ListPackageLists (EFI_HII_PACKAGE_STRINGS, NULL, &BufferLength, &Buffer);\r
   if (Status == EFI_SUCCESS) {\r
+    ASSERT (Buffer != NULL);\r
     for (Index = 0; Index < BufferLength / sizeof (EFI_HII_HANDLE); Index++) {\r
       ThunkContext = CreateThunkContextForUefiHiiHandle (Buffer[Index]);\r
       ASSERT (ThunkContext!= NULL);\r
@@ -243,7 +244,7 @@ InitializeHiiDatabase (
   @param This                 A pointer to the EFI_HII_PROTOCOL instance.\r
   @param HandleBufferLength   On input, a pointer to the length of the handle buffer. \r
                               On output, the length of the handle buffer that is required for the handles found.\r
-  @param Handle               An array of EFI_HII_HANDLE instances returned. \r
+  @param Handle               Pointer to an array of EFI_HII_HANDLE instances returned. \r
                               Type EFI_HII_HANDLE is defined in EFI_HII_PROTOCOL.NewPack() in the Packages section.\r
 \r
   @retval EFI_SUCCESS         Handle was updated successfully.\r
@@ -257,13 +258,13 @@ EFIAPI
 HiiFindHandles (\r
   IN     EFI_HII_PROTOCOL *This,\r
   IN OUT UINT16           *HandleBufferLength,\r
-  OUT    FRAMEWORK_EFI_HII_HANDLE    Handle[1]\r
+  OUT    FRAMEWORK_EFI_HII_HANDLE    *Handle\r
   )\r
 {\r
-  UINT16                                     Count;\r
-  LIST_ENTRY                                *Link;\r
-  HII_THUNK_CONTEXT *ThunkContext;\r
-  HII_THUNK_PRIVATE_DATA               *Private;\r
+  UINT16                      Count;\r
+  LIST_ENTRY                  *Link;\r
+  HII_THUNK_CONTEXT           *ThunkContext;\r
+  HII_THUNK_PRIVATE_DATA      *Private;\r
 \r
   if (HandleBufferLength == NULL) {\r
     return EFI_INVALID_PARAMETER;\r
@@ -318,9 +319,9 @@ HiiFindHandles (
                         registered on the handle. The routine will not return the three-spaces language identifier used in \r
                         other functions to indicate non-language-specific strings.\r
 \r
-  @reval EFI_SUCCESS            LanguageString was correctly returned.\r
+  @retval EFI_SUCCESS            LanguageString was correctly returned.\r
  \r
-  @reval EFI_INVALID_PARAMETER The Handle was unknown.\r
+  @retval EFI_INVALID_PARAMETER  The Handle was unknown.\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -386,7 +387,7 @@ Done:
   If not enough resource to complete the operation, then ASSERT.\r
 \r
   @param  HiiHandle              The HII package list handle.\r
-  @param  FirstLanguage          Pointer to language name buffer.\r
+  @param  PrimaryLanguage        Pointer to language name buffer.\r
   \r
   @return The supported languages.\r
 \r
@@ -395,7 +396,7 @@ CHAR8 *
 EFIAPI\r
 HiiGetSupportedSecondaryLanguages (\r
   IN EFI_HII_HANDLE           HiiHandle,\r
-  IN CONST CHAR8              *FirstLanguage\r
+  IN CONST CHAR8              *PrimaryLanguage\r
   )\r
 {\r
   EFI_STATUS  Status;\r
@@ -414,7 +415,7 @@ HiiGetSupportedSecondaryLanguages (
     return NULL;\r
   }\r
 \r
-  Status = mHiiStringProtocol->GetSecondaryLanguages (mHiiStringProtocol, HiiHandle, FirstLanguage, LanguageString, &BufferSize);\r
+  Status = mHiiStringProtocol->GetSecondaryLanguages (mHiiStringProtocol, HiiHandle, PrimaryLanguage, LanguageString, &BufferSize);\r
   ASSERT (Status != EFI_NOT_FOUND);\r
   \r
   if (Status == EFI_BUFFER_TOO_SMALL) {\r
@@ -424,7 +425,7 @@ HiiGetSupportedSecondaryLanguages (
       return NULL;\r
     }\r
 \r
-    Status = mHiiStringProtocol->GetSecondaryLanguages (mHiiStringProtocol, HiiHandle, FirstLanguage, LanguageString, &BufferSize);\r
+    Status = mHiiStringProtocol->GetSecondaryLanguages (mHiiStringProtocol, HiiHandle, PrimaryLanguage, LanguageString, &BufferSize);\r
   }\r
 \r
   if (EFI_ERROR (Status)) {\r
@@ -451,8 +452,8 @@ HiiGetSupportedSecondaryLanguages (
                          but returns a NULL LanguageString if there are no secondary languages associated with the input Handle and \r
                          PrimaryLanguage pair. Type EFI_STRING is defined in String.\r
   \r
-  @reval EFI_SUCCESS            LanguageString was correctly returned.\r
-  @reval EFI_INVALID_PARAMETER  The Handle was unknown.\r
+  @retval EFI_SUCCESS            LanguageString was correctly returned.\r
+  @retval EFI_INVALID_PARAMETER  The Handle was unknown.\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -493,7 +494,7 @@ HiiGetSecondaryLanguages (
   UnicodeStrToAsciiStr (PrimaryLanguage, PrimaryLang639);\r
 \r
   PrimaryLang4646 = ConvertLanguagesIso639ToRfc4646 (PrimaryLang639);\r
-  ASSERT_EFI_ERROR (PrimaryLang4646 != NULL);\r
+  ASSERT (PrimaryLang4646 != NULL);\r
 \r
   SecLangCodes4646 = HiiGetSupportedSecondaryLanguages (UefiHiiHandle, PrimaryLang4646);\r
 \r
@@ -543,4 +544,3 @@ Done:
   return Status;\r
 }\r
 \r
\r