]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
Update comments to follow new spec definition.
[mirror_edk2.git] / MdeModulePkg / Universal / HiiDatabaseDxe / ConfigRouting.c
index 4c448a32a772b575889fafb13023ad9794d467c7..d6705d02473edecb5555b851e0e5cdb96e285c42 100644 (file)
@@ -1125,6 +1125,7 @@ GetVarStoreType (
   GuidStr          = NULL;\r
   NameStr          = NULL;\r
   TempStr          = NULL;\r
+  *IsEfiVarstore   = FALSE;\r
 \r
   Status = GetFormPackageData(DataBaseRecord, &HiiFormPackage, &PackageSize);\r
   if (EFI_ERROR (Status)) {\r
@@ -1433,20 +1434,12 @@ ParseIfrData (
   CHAR16                   *VarStoreName;\r
   UINT16                   VarWidth;\r
   UINT16                   VarDefaultId;\r
-  EFI_STRING               GuidStr;\r
-  EFI_STRING               NameStr;\r
-  EFI_STRING               TempStr;\r
-  UINTN                    LengthString;\r
   BOOLEAN                  FirstOneOfOption;\r
   LIST_ENTRY               *LinkData;\r
   LIST_ENTRY               *LinkDefault;\r
   EFI_IFR_VARSTORE_NAME_VALUE *IfrNameValueVarStore;\r
 \r
-  LengthString     = 0;\r
   Status           = EFI_SUCCESS;\r
-  GuidStr          = NULL;\r
-  NameStr          = NULL;\r
-  TempStr          = NULL;\r
   BlockData        = NULL;\r
   DefaultDataPtr   = NULL;\r
   FirstOneOfOption = FALSE;\r
@@ -1955,7 +1948,7 @@ ParseIfrData (
         //\r
         // Check whether this question is in requested block array.\r
         //\r
-        if (!BlockArrayCheck (RequestBlockArray, BlockData->Offset, BlockData->Width, BlockData->Name != NULL, HiiHandle)) {\r
+        if (!BlockArrayCheck (RequestBlockArray, BlockData->Offset, BlockData->Width, (BOOLEAN)(BlockData->Name != NULL), HiiHandle)) {\r
           //\r
           // This question is not in the requested string. Skip it.\r
           //\r
@@ -2875,7 +2868,6 @@ GetFullStringFromHiiFormPackages (
   EFI_STRING                   ConfigHdr;\r
   EFI_STRING                   StringPtr;\r
   EFI_STRING                   Progress;\r
-  BOOLEAN                      DataExist;\r
 \r
   if (DataBaseRecord == NULL || DevicePath == NULL || Request == NULL || AltCfgResp == NULL) {\r
     return EFI_INVALID_PARAMETER;\r
@@ -2891,7 +2883,6 @@ GetFullStringFromHiiFormPackages (
   ConfigHdr         = NULL;\r
   HiiFormPackage    = NULL;\r
   PackageSize       = 0;\r
-  DataExist         = FALSE;\r
   Progress          = *Request;\r
 \r
   Status = GetFormPackageData (DataBaseRecord, &HiiFormPackage, &PackageSize);\r
@@ -3776,9 +3767,9 @@ Done:
                                  instance.\r
   @param  Results                Null-terminated Unicode string in\r
                                  <MultiConfigAltResp> format which has all values\r
-                                 filled in for the names in the Request string.\r
-                                 String to be allocated by the  called function.\r
-                                 De-allocation is up to the caller.\r
+                                 filled in for the entirety of the current HII \r
+                                 database. String to be allocated by the  called \r
+                                 function. De-allocation is up to the caller.\r
 \r
   @retval EFI_SUCCESS            The Results string is filled with the values\r
                                  corresponding to all requested names.\r
@@ -4491,8 +4482,9 @@ Exit:
                                  (see below)  is returned.\r
   @param  BlockSize              The length of the Block in units of UINT8.  On\r
                                  input, this is the size of the Block. On output,\r
-                                 if successful, contains the index of the  last\r
-                                 modified byte in the Block.\r
+                                 if successful, contains the largest index of the\r
+                                 modified byte in the Block, or the required buffer\r
+                                 size if the Block is not large enough.\r
   @param  Progress               On return, points to an element of the ConfigResp\r
                                  string filled in with the offset of the most\r
                                  recent '&' before the first failing name / value\r
@@ -4512,7 +4504,8 @@ Exit:
                                  value pair. Block is left updated and\r
                                  Progress points at the '&' preceding the first\r
                                  non-<BlockName>.\r
-  @retval EFI_DEVICE_ERROR       Block not large enough. Progress undefined.\r
+  @retval EFI_BUFFER_TOO_SMALL   Block not large enough. Progress undefined. \r
+                                 BlockSize is updated with the required buffer size.\r
   @retval EFI_NOT_FOUND          Target for the specified routing data was not found.\r
                                  Progress points to the "G" in "GUID" of the errant\r
                                  routing data.\r
@@ -4689,7 +4682,7 @@ HiiConfigToBlock (
   if (MaxBlockSize > BufferSize) {\r
     *BlockSize = MaxBlockSize;\r
     if (Block != NULL) {\r
-      return EFI_DEVICE_ERROR;\r
+      return EFI_BUFFER_TOO_SMALL;\r
     }\r
   }\r
 \r