]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
Fix a potential bug that GetLanguages() API may return incorrect languages in a strin...
[mirror_edk2.git] / MdeModulePkg / Universal / HiiDatabaseDxe / ConfigRouting.c
index 36cf919b42ae1c66dde3d673ce80c83e2550834d..d55fdf436671511e688f2bbbb6b8ca81d237a800 100644 (file)
@@ -452,15 +452,6 @@ HiiConfigRoutingExtractConfig (
   EFI_STRING                          AccessResults;\r
   BOOLEAN                             FirstElement;\r
 \r
-  //\r
-  // For size reduction, please define PcdSupportFullConfigRoutingProtocol \r
-  // as FALSE. But this renders the system to not 100% compliant with\r
-  // UEFI 2.1. Use this with caution.\r
-  //\r
-  if (!FeaturePcdGet (PcdSupportFullConfigRoutingProtocol)) {\r
-    return EFI_UNSUPPORTED;\r
-  }\r
-\r
   if (This == NULL || Progress == NULL || Results == NULL) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
@@ -660,15 +651,6 @@ HiiConfigRoutingExportConfig (
   UINTN                               NumberConfigAccessHandles;\r
   BOOLEAN                             FirstElement;\r
 \r
-  //\r
-  // For size reduction, please define PcdSupportFullConfigRoutingProtocol \r
-  // as FALSE. But this renders the system to not 100% compliant with\r
-  // UEFI 2.1. Use this with caution.\r
-  //\r
-  if (!FeaturePcdGet (PcdSupportFullConfigRoutingProtocol)) {\r
-    return EFI_UNSUPPORTED;\r
-  }\r
-\r
   if (This == NULL || Results == NULL) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
@@ -784,15 +766,6 @@ HiiConfigRoutingRouteConfig (
   EFI_HII_CONFIG_ACCESS_PROTOCOL      *ConfigAccess;\r
   EFI_STRING                          AccessProgress;\r
 \r
-  //\r
-  // For size reduction, please define PcdSupportFullConfigRoutingProtocol \r
-  // as FALSE. But this renders the system to not 100% compliant with\r
-  // UEFI 2.1. Use this with caution.\r
-  //\r
-  if (!FeaturePcdGet (PcdSupportFullConfigRoutingProtocol)) {\r
-    return EFI_UNSUPPORTED;\r
-  }\r
-\r
   if (This == NULL || Progress == NULL) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
@@ -1321,7 +1294,7 @@ HiiConfigToBlock (
     // Get Offset\r
     //\r
     Status = GetValueOfNumber (StringPtr, &TmpBuffer, &Length);\r
-    if (Status == EFI_OUT_OF_RESOURCES) {\r
+    if (EFI_ERROR (Status)) {\r
       *Progress = ConfigResp;\r
       goto Exit;\r
     }\r
@@ -1369,7 +1342,7 @@ HiiConfigToBlock (
     // Get Value\r
     //\r
     Status = GetValueOfNumber (StringPtr, &Value, &Length);\r
-    if (Status == EFI_OUT_OF_RESOURCES) {\r
+    if (EFI_ERROR (Status)) {\r
       *Progress = ConfigResp;\r
       goto Exit;\r
     }\r
@@ -1490,15 +1463,6 @@ HiiGetAltCfg (
   BOOLEAN                             NameFlag;\r
   BOOLEAN                             PathFlag;\r
 \r
-  //\r
-  // For size reduction, please define PcdSupportFullConfigRoutingProtocol \r
-  // as FALSE. But this renders the system to not 100% compliant with\r
-  // UEFI 2.1. Use this with caution.\r
-  //\r
-  if (!FeaturePcdGet (PcdSupportFullConfigRoutingProtocol)) {\r
-    return EFI_UNSUPPORTED;\r
-  }\r
-\r
   HdrStart = NULL;\r
   HdrEnd   = NULL;\r
   GuidStr  = NULL;\r
@@ -1643,7 +1607,7 @@ HiiGetAltCfg (
 \r
 Exit:\r
 \r
-  if (!EFI_ERROR (Status)) {\r
+  if (!EFI_ERROR (Status) && (Result != NULL)) {\r
     //\r
     // Copy the <ConfigHdr> and <ConfigBody>\r
     //\r