]> git.proxmox.com Git - mirror_edk2.git/commitdiff
1. Correct Col * Row string
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 14 Aug 2009 02:21:55 +0000 (02:21 +0000)
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 14 Aug 2009 02:21:55 +0000 (02:21 +0000)
2. Add error handle for no data hub system.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9065 6f19259b-4bc3-4df7-8a09-765794883524

IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/UpdatePage.c
IntelFrameworkModulePkg/Universal/BdsDxe/FrontPage.c

index 790fe51d444967126e403d273be0ee5496d89c6e..5146399dd4b33d67861a6b25b2c924bca92dc4d4 100644 (file)
@@ -754,7 +754,6 @@ UpdateConModePage (
   UINTN                         Index;\r
   UINTN                         Col;\r
   UINTN                         Row;\r
   UINTN                         Index;\r
   UINTN                         Col;\r
   UINTN                         Row;\r
-  CHAR16                        RowString[50];\r
   CHAR16                        ModeString[50];\r
   CHAR16                        *PStr;\r
   UINTN                         MaxMode;\r
   CHAR16                        ModeString[50];\r
   CHAR16                        *PStr;\r
   UINTN                         MaxMode;\r
@@ -813,10 +812,9 @@ UpdateConModePage (
     //\r
     UnicodeValueToString (ModeString, 0, Col, 0);\r
     PStr = &ModeString[0];\r
     //\r
     UnicodeValueToString (ModeString, 0, Col, 0);\r
     PStr = &ModeString[0];\r
-    StrnCat (PStr, L" x ", StrLen(L" x "));\r
-    UnicodeValueToString (RowString, 0, Row, 0);\r
-    PStr = &ModeString[0];\r
-    StrnCat (PStr, RowString, StrLen(RowString));\r
+    StrnCat (PStr, L" x ", StrLen(L" x ") + 1);\r
+    PStr = PStr + StrLen (PStr);\r
+    UnicodeValueToString (PStr , 0, Row, 0);\r
 \r
     ModeToken[Index] = HiiSetString (CallbackData->BmmHiiHandle, 0, ModeString, NULL);\r
 \r
 \r
     ModeToken[Index] = HiiSetString (CallbackData->BmmHiiHandle, 0, ModeString, NULL);\r
 \r
index 9f25ebca6b154157c221a3bc6e672befaf3fdb34..55fce979f781cf8f2ff961ee6ac0f83cac58e07e 100644 (file)
@@ -721,6 +721,9 @@ UpdateFrontPageStrings (
   Record          = NULL;\r
   do {\r
     Status = DataHub->GetNextRecord (DataHub, &MonotonicCount, NULL, &Record);\r
   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
     if (Record->DataRecordClass == EFI_DATA_RECORD_CLASS_DATA) {\r
       DataHeader = (EFI_SUBCLASS_TYPE1_HEADER *) (Record + 1);\r
       if (CompareGuid (&Record->DataRecordGuid, &gEfiMiscSubClassGuid) &&\r