Check the GUID too before identify the opcode is a LABEL, otherwise it may treat other GUID opcode as a LABEL and mess up the FormSet.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6433 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
qwang12 2008-11-08 04:36:22 +00:00
parent 2563c29363
commit 3597bcbe27
3 changed files with 5 additions and 4 deletions

View File

@ -53,7 +53,7 @@ ExtendedIfrSupportLibConstructor (
GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID mIfrVendorGuid = EFI_IFR_TIANO_GUID; GLOBAL_REMOVE_IF_UNREFERENCED CONST EFI_GUID mIfrVendorGuid = EFI_IFR_TIANO_GUID;
/** /**
Extract formset class for given HII handle. Extract formset class for given HII handle.

View File

@ -179,7 +179,8 @@ UpdateFormPackageData (
ExtendOpCode = ((EFI_IFR_GUID_LABEL *) IfrOpHdr)->ExtendOpCode; ExtendOpCode = ((EFI_IFR_GUID_LABEL *) IfrOpHdr)->ExtendOpCode;
CopyMem (&LabelNumber, &((EFI_IFR_GUID_LABEL *)IfrOpHdr)->Number, sizeof (UINT16)); CopyMem (&LabelNumber, &((EFI_IFR_GUID_LABEL *)IfrOpHdr)->Number, sizeof (UINT16));
if ((ExtendOpCode != EFI_IFR_EXTEND_OP_LABEL) || (LabelNumber != Label)) { if ((ExtendOpCode != EFI_IFR_EXTEND_OP_LABEL) || (LabelNumber != Label)
|| !CompareGuid (&((EFI_IFR_GUID_LABEL *)IfrOpHdr)->Guid, &mIfrVendorGuid)) {
// //
// Go to the next Op-Code // Go to the next Op-Code
// //
@ -218,7 +219,7 @@ UpdateFormPackageData (
IfrOpHdr = (EFI_IFR_OP_HEADER *) ((CHAR8 *) (IfrOpHdr) + IfrOpHdr->Length); IfrOpHdr = (EFI_IFR_OP_HEADER *) ((CHAR8 *) (IfrOpHdr) + IfrOpHdr->Length);
if (IfrOpHdr->OpCode == EFI_IFR_GUID_OP) { if (IfrOpHdr->OpCode == EFI_IFR_GUID_OP) {
ExtendOpCode = ((EFI_IFR_GUID_LABEL *) IfrOpHdr)->ExtendOpCode; ExtendOpCode = ((EFI_IFR_GUID_LABEL *) IfrOpHdr)->ExtendOpCode;
if (ExtendOpCode == EFI_IFR_EXTEND_OP_LABEL) { if ((ExtendOpCode == EFI_IFR_EXTEND_OP_LABEL) && CompareGuid (&((EFI_IFR_GUID_LABEL *)IfrOpHdr)->Guid, &mIfrVendorGuid)) {
break; break;
} }
} }

View File

@ -34,6 +34,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <MdeModuleHii.h> #include <MdeModuleHii.h>
extern EFI_GUID mIfrVendorGuid; extern CONST EFI_GUID mIfrVendorGuid;
#endif #endif