]> 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 95ca8d4777fd0ebc80093be3348adb2b13091fad..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
@@ -1430,18 +1431,18 @@ ParseIfrData (
   IFR_DEFAULT_DATA         DefaultData;\r
   IFR_DEFAULT_DATA         *DefaultDataPtr;\r
   IFR_BLOCK_DATA           *BlockData;\r
-  CHAR16                   *VarStoreName;
-  UINT16                   VarWidth;
-  UINT16                   VarDefaultId;
-  BOOLEAN                  FirstOneOfOption;
-  LIST_ENTRY               *LinkData;
-  LIST_ENTRY               *LinkDefault;
-  EFI_IFR_VARSTORE_NAME_VALUE *IfrNameValueVarStore;
-
-  Status           = EFI_SUCCESS;
-  BlockData        = NULL;
-  DefaultDataPtr   = NULL;
-  FirstOneOfOption = FALSE;
+  CHAR16                   *VarStoreName;\r
+  UINT16                   VarWidth;\r
+  UINT16                   VarDefaultId;\r
+  BOOLEAN                  FirstOneOfOption;\r
+  LIST_ENTRY               *LinkData;\r
+  LIST_ENTRY               *LinkDefault;\r
+  EFI_IFR_VARSTORE_NAME_VALUE *IfrNameValueVarStore;\r
+\r
+  Status           = EFI_SUCCESS;\r
+  BlockData        = NULL;\r
+  DefaultDataPtr   = NULL;\r
+  FirstOneOfOption = FALSE;\r
   ZeroMem (&DefaultData, sizeof (IFR_DEFAULT_DATA));\r
 \r
   //\r
@@ -2864,12 +2865,12 @@ GetFullStringFromHiiFormPackages (
   IFR_DEFAULT_DATA             *DefaultIdArray;\r
   IFR_VARSTORAGE_DATA          *VarStorageData;\r
   EFI_STRING                   DefaultAltCfgResp;\r
-  EFI_STRING                   ConfigHdr;
-  EFI_STRING                   StringPtr;
-  EFI_STRING                   Progress;
-
-  if (DataBaseRecord == NULL || DevicePath == NULL || Request == NULL || AltCfgResp == NULL) {
-    return EFI_INVALID_PARAMETER;
+  EFI_STRING                   ConfigHdr;\r
+  EFI_STRING                   StringPtr;\r
+  EFI_STRING                   Progress;\r
+\r
+  if (DataBaseRecord == NULL || DevicePath == NULL || Request == NULL || AltCfgResp == NULL) {\r
+    return EFI_INVALID_PARAMETER;\r
   }\r
 \r
   //\r
@@ -2879,12 +2880,12 @@ GetFullStringFromHiiFormPackages (
   DefaultIdArray    = NULL;\r
   VarStorageData    = NULL;\r
   DefaultAltCfgResp = NULL;\r
-  ConfigHdr         = NULL;
-  HiiFormPackage    = NULL;
-  PackageSize       = 0;
-  Progress          = *Request;
-
-  Status = GetFormPackageData (DataBaseRecord, &HiiFormPackage, &PackageSize);
+  ConfigHdr         = NULL;\r
+  HiiFormPackage    = NULL;\r
+  PackageSize       = 0;\r
+  Progress          = *Request;\r
+\r
+  Status = GetFormPackageData (DataBaseRecord, &HiiFormPackage, &PackageSize);\r
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
@@ -3766,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
@@ -4481,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
@@ -4502,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
@@ -4679,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