From 76c2425177bc419d8aa03749a57ece4ecde22066 Mon Sep 17 00:00:00 2001 From: lgao4 Date: Thu, 14 May 2009 12:37:02 +0000 Subject: Update HiiDataBase to fix parsing Hii package error. Some HiiPackages have no varstore and question, they has no the built in default value. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8314 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Library/UefiHiiLib/HiiLib.c | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) (limited to 'MdeModulePkg/Library/UefiHiiLib') diff --git a/MdeModulePkg/Library/UefiHiiLib/HiiLib.c b/MdeModulePkg/Library/UefiHiiLib/HiiLib.c index de7cb3f46e..b9323706a6 100644 --- a/MdeModulePkg/Library/UefiHiiLib/HiiLib.c +++ b/MdeModulePkg/Library/UefiHiiLib/HiiLib.c @@ -1177,6 +1177,11 @@ InternalHiiValidateCurrentSetting ( } Link = Link->ForwardLink; } + + if (IsListEmpty (&CurrentBlockArray->Entry)) { + Status = EFI_SUCCESS; + goto Done; + } // // 2. Check IFR value is in block data, then Validate Vaule @@ -1233,7 +1238,7 @@ InternalHiiValidateCurrentSetting ( // Check the matched VarStoreId is found. // if (IfrVarStore == NULL) { - Status = EFI_NOT_FOUND; + Status = EFI_SUCCESS; goto Done; } break; @@ -1580,7 +1585,7 @@ BOOLEAN EFIAPI InternalHiiIfrValueAction ( IN CONST EFI_STRING Request, OPTIONAL - IN UINT16 DefaultId, + IN UINT16 DefaultId, IN UINT8 ActionType ) { @@ -1738,6 +1743,7 @@ InternalHiiIfrValueAction ( // Its default value and validating can't execute by parsing IFR data. // Directly jump into the next ConfigAltResp string for another pair Guid, Name, and Path. // + Status = EFI_SUCCESS; goto NextConfigAltResp; } @@ -1819,7 +1825,8 @@ InternalHiiIfrValueAction ( // Not found the matched default string ID // if (EFI_ERROR (Status)) { - goto Done; + Status = EFI_SUCCESS; + goto NextConfigAltResp; } } @@ -1838,7 +1845,8 @@ InternalHiiIfrValueAction ( ); if (EFI_ERROR (Status)) { - goto Done; + Status = EFI_SUCCESS; + goto NextConfigAltResp; } // @@ -1861,6 +1869,7 @@ InternalHiiIfrValueAction ( goto Done; } +NextConfigAltResp: // // Free the allocated pacakge buffer and the got ConfigResp string. // @@ -1868,11 +1877,12 @@ InternalHiiIfrValueAction ( FreePool (HiiPackageList); HiiPackageList = NULL; } + + if (ConfigResp != NULL) { + FreePool (ConfigResp); + ConfigResp = NULL; + } - FreePool (ConfigResp); - ConfigResp = NULL; - -NextConfigAltResp: // // Free the allocated buffer. // -- cgit v1.2.3