1. Correct Col * Row string

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
This commit is contained in:
lgao4 2009-08-14 02:21:55 +00:00
parent aeddd42532
commit b55f8b0146
2 changed files with 6 additions and 5 deletions

View File

@ -754,7 +754,6 @@ UpdateConModePage (
UINTN Index; UINTN Index;
UINTN Col; UINTN Col;
UINTN Row; UINTN Row;
CHAR16 RowString[50];
CHAR16 ModeString[50]; CHAR16 ModeString[50];
CHAR16 *PStr; CHAR16 *PStr;
UINTN MaxMode; UINTN MaxMode;
@ -813,10 +812,9 @@ UpdateConModePage (
// //
UnicodeValueToString (ModeString, 0, Col, 0); UnicodeValueToString (ModeString, 0, Col, 0);
PStr = &ModeString[0]; PStr = &ModeString[0];
StrnCat (PStr, L" x ", StrLen(L" x ")); StrnCat (PStr, L" x ", StrLen(L" x ") + 1);
UnicodeValueToString (RowString, 0, Row, 0); PStr = PStr + StrLen (PStr);
PStr = &ModeString[0]; UnicodeValueToString (PStr , 0, Row, 0);
StrnCat (PStr, RowString, StrLen(RowString));
ModeToken[Index] = HiiSetString (CallbackData->BmmHiiHandle, 0, ModeString, NULL); ModeToken[Index] = HiiSetString (CallbackData->BmmHiiHandle, 0, ModeString, NULL);

View File

@ -721,6 +721,9 @@ UpdateFrontPageStrings (
Record = NULL; Record = NULL;
do { do {
Status = DataHub->GetNextRecord (DataHub, &MonotonicCount, NULL, &Record); Status = DataHub->GetNextRecord (DataHub, &MonotonicCount, NULL, &Record);
if (EFI_ERROR (Status) || Record == NULL) {
break;
}
if (Record->DataRecordClass == EFI_DATA_RECORD_CLASS_DATA) { if (Record->DataRecordClass == EFI_DATA_RECORD_CLASS_DATA) {
DataHeader = (EFI_SUBCLASS_TYPE1_HEADER *) (Record + 1); DataHeader = (EFI_SUBCLASS_TYPE1_HEADER *) (Record + 1);
if (CompareGuid (&Record->DataRecordGuid, &gEfiMiscSubClassGuid) && if (CompareGuid (&Record->DataRecordGuid, &gEfiMiscSubClassGuid) &&