]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkModulePkg/Universal/BdsDxe/FrontPage.c
1. Correct Col * Row string
[mirror_edk2.git] / IntelFrameworkModulePkg / Universal / BdsDxe / FrontPage.c
index 9443a65bcdfe9404bcebde3eb42b432e26e9c949..55fce979f781cf8f2ff961ee6ac0f83cac58e07e 100644 (file)
@@ -56,7 +56,7 @@ HII_VENDOR_DEVICE_PATH  mFrontPageHiiVendorDevicePath = {
   {\r
     END_DEVICE_PATH_TYPE,\r
     END_ENTIRE_DEVICE_PATH_SUBTYPE,\r
-    { \r
+    {\r
       (UINT8) (END_DEVICE_PATH_LENGTH),\r
       (UINT8) ((END_DEVICE_PATH_LENGTH) >> 8)\r
     }\r
@@ -94,6 +94,9 @@ FakeExtractConfig (
   OUT EFI_STRING                             *Results\r
   )\r
 {\r
+  if (Request == NULL || Progress == NULL || Results == NULL) {\r
+    return EFI_INVALID_PARAMETER;\r
+  }\r
   *Progress = Request;\r
   return EFI_NOT_FOUND;\r
 }\r
@@ -122,15 +125,18 @@ FakeRouteConfig (
   OUT EFI_STRING                             *Progress\r
   )\r
 {\r
-  if (Configuration == NULL) {\r
+  if (Configuration == NULL || Progress == NULL) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
-  if (Progress == NULL) {\r
-    return EFI_INVALID_PARAMETER;\r
+  *Progress = Configuration;\r
+  if (!HiiIsConfigHdrMatch (Configuration, &mBootMaintGuid, mBootMaintStorageName)\r
+      && !HiiIsConfigHdrMatch (Configuration, &mFileExplorerGuid, mFileExplorerStorageName)) {\r
+    return EFI_NOT_FOUND;\r
   }\r
 \r
-  return EFI_NOT_FOUND;\r
+  *Progress = Configuration + StrLen (Configuration);\r
+  return EFI_SUCCESS;\r
 }\r
 \r
 /**\r
@@ -199,7 +205,7 @@ FrontPageCallback (
     //\r
     Lang = AllocatePool (AsciiStrSize (LanguageString));\r
     ASSERT (Lang != NULL);\r
-    \r
+\r
     Index = 0;\r
     LangCode = LanguageString;\r
     while (*LangCode != 0) {\r
@@ -220,7 +226,7 @@ FrontPageCallback (
                                      );\r
       ASSERT (PlatformSupportedLanguages != NULL);\r
     }\r
-    \r
+\r
     //\r
     // Select the best language in platform supported Language.\r
     //\r
@@ -431,7 +437,7 @@ InitializeFrontPage (
   OptionCount = 0;\r
   LangCode    = LanguageString;\r
   FirstFlag   = FALSE;\r
-  \r
+\r
   if (gFrontPagePrivate.LanguageToken == NULL) {\r
     while (*LangCode != 0) {\r
       GetNextLanguage (&LangCode, Lang);\r
@@ -614,7 +620,7 @@ GetProducerString (
 }\r
 \r
 /**\r
-  Convert Processor Frequency Data to a string\r
+  Convert Processor Frequency Data to a string.\r
 \r
   @param ProcessorFrequency The frequency data to process\r
   @param String             The string that is created\r
@@ -715,6 +721,9 @@ UpdateFrontPageStrings (
   Record          = NULL;\r
   do {\r
     Status = DataHub->GetNextRecord (DataHub, &MonotonicCount, NULL, &Record);\r
+    if (EFI_ERROR (Status) || Record == NULL) {\r
+      break;\r
+    }\r
     if (Record->DataRecordClass == EFI_DATA_RECORD_CLASS_DATA) {\r
       DataHeader = (EFI_SUBCLASS_TYPE1_HEADER *) (Record + 1);\r
       if (CompareGuid (&Record->DataRecordGuid, &gEfiMiscSubClassGuid) &&\r
@@ -871,7 +880,7 @@ ShowProgress (
   }\r
 \r
   DEBUG ((EFI_D_INFO, "\n\nStart showing progress bar... Press any key to stop it! ...Zzz....\n"));\r
-  \r
+\r
   SetMem (&Foreground, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL), 0xff);\r
   SetMem (&Background, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL), 0x0);\r
   SetMem (&Color, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL), 0xff);\r
@@ -887,7 +896,7 @@ ShowProgress (
   TimeoutRemain = TimeoutDefault;\r
   while (TimeoutRemain != 0) {\r
     DEBUG ((EFI_D_INFO, "Showing progress bar...Remaining %d second!\n", TimeoutRemain));\r
-    \r
+\r
     Status = WaitForSingleEvent (gST->ConIn->WaitForKey, ONE_SECOND);\r
     if (Status != EFI_TIMEOUT) {\r
       break;\r
@@ -955,7 +964,7 @@ PlatformBdsEnterFrontPage (
 {\r
   EFI_STATUS                    Status;\r
 \r
-  PERF_START (0, "BdsTimeOut", "BDS", 0);\r
+  PERF_START (NULL, "BdsTimeOut", "BDS", 0);\r
   //\r
   // Indicate if we need connect all in the platform setup\r
   //\r
@@ -1066,5 +1075,5 @@ Exit:
   // Note: The following lines of code only execute when Auto boot\r
   // takes affect\r
   //\r
-  PERF_END (0, "BdsTimeOut", "BDS", 0);\r
+  PERF_END (NULL, "BdsTimeOut", "BDS", 0);\r
 }\r