Add in a temp fix to make UEFI HII SCT can pass with platform built with FrameworkHiiToUefiHiiThunk module.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5829 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
qwang12 2008-09-05 07:01:47 +00:00
parent f1b420aa4e
commit f38360fbf0
1 changed files with 19 additions and 12 deletions

View File

@ -578,22 +578,29 @@ RemovePackNotify (
ThunkContext = UefiHiiHandleToThunkContext (Private, Handle); ThunkContext = UefiHiiHandleToThunkContext (Private, Handle);
if (!ThunkContext->ByFrameworkHiiNewPack) { //
Status = HiiLibExportPackageLists (Handle, &HiiPackageList, &BufferSize); // BugBug: Change to ASSERT if HII Database fix the bug and to also invoke
ASSERT_EFI_ERROR (Status); // NEW_PACK_NOTIFY for package (String Package) created internally.
//
if (ThunkContext != NULL) {
if (!ThunkContext->ByFrameworkHiiNewPack) {
Status = HiiLibExportPackageLists (Handle, &HiiPackageList, &BufferSize);
ASSERT_EFI_ERROR (Status);
if (GetPackageCountByType (HiiPackageList, EFI_HII_PACKAGE_STRINGS) == 1) { if (GetPackageCountByType (HiiPackageList, EFI_HII_PACKAGE_STRINGS) == 1) {
// //
// If the string package will be removed is the last string package // If the string package will be removed is the last string package
// in the package list, we will remove the HII Thunk entry from the // in the package list, we will remove the HII Thunk entry from the
// database. // database.
// //
DestroyThunkContextForUefiHiiHandle (Private, Handle); DestroyThunkContextForUefiHiiHandle (Private, Handle);
}
FreePool (HiiPackageList);
} }
FreePool (HiiPackageList);
} }
return Status; return Status;
} }