diff options
author | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-09-18 09:14:00 +0000 |
---|---|---|
committer | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-09-18 09:14:00 +0000 |
commit | 66df25318672baf41db5b2d640020e61cca97a35 (patch) | |
tree | c047fb8876d7fedbc2e11f826e394118bfdd0700 /EdkCompatibilityPkg/Compatibility | |
parent | 4792a1a65b7d70c196d95f8e4b46f382c530b175 (diff) | |
download | edk2-platforms-66df25318672baf41db5b2d640020e61cca97a35.tar.xz |
1. Correct CopyMem and CompareMem to CopyGuid and CompareGuid for GUID data
2. Add the missing processor type in DataHubRecords/DataHubSubClassProcessor.h file.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5926 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EdkCompatibilityPkg/Compatibility')
3 files changed, 16 insertions, 6 deletions
diff --git a/EdkCompatibilityPkg/Compatibility/FrameworkHiiToUefiHiiThunk/Strings.c b/EdkCompatibilityPkg/Compatibility/FrameworkHiiToUefiHiiThunk/Strings.c index 14e27dda18..c648e1da1a 100644 --- a/EdkCompatibilityPkg/Compatibility/FrameworkHiiToUefiHiiThunk/Strings.c +++ b/EdkCompatibilityPkg/Compatibility/FrameworkHiiToUefiHiiThunk/Strings.c @@ -31,9 +31,19 @@ ConvertIso639ToRfc3066 ( )
{
UINTN Index;
+ CHAR8 AsciiLanguage[ISO_639_2_ENTRY_SIZE + 1];
+
+ AsciiStrnCpy (AsciiLanguage, Iso638Lang, sizeof (AsciiLanguage));
+ for (Index = 0; Index < ISO_639_2_ENTRY_SIZE + 1; Index ++) {
+ if (AsciiLanguage [Index] == 0) {
+ break;
+ } else if (AsciiLanguage [Index] >= 'A' && AsciiLanguage [Index] <= 'Z') {
+ AsciiLanguage [Index] = AsciiLanguage [Index] - 'A' + 'a';
+ }
+ }
for (Index = 0; Index < sizeof (Iso639ToRfc3066Map) / sizeof (Iso639ToRfc3066Map[0]); Index++) {
- if (AsciiStrnCmp (Iso638Lang, Iso639ToRfc3066Map[Index].Iso639, AsciiStrSize (Iso638Lang)) == 0) {
+ if (AsciiStrnCmp (AsciiLanguage, Iso639ToRfc3066Map[Index].Iso639, AsciiStrSize (AsciiLanguage)) == 0) {
return Iso639ToRfc3066Map[Index].Rfc3066;
}
}
diff --git a/EdkCompatibilityPkg/Compatibility/FrameworkHiiToUefiHiiThunk/UefiIfrParser.c b/EdkCompatibilityPkg/Compatibility/FrameworkHiiToUefiHiiThunk/UefiIfrParser.c index c22c0b6da8..6c7d19c2cd 100644 --- a/EdkCompatibilityPkg/Compatibility/FrameworkHiiToUefiHiiThunk/UefiIfrParser.c +++ b/EdkCompatibilityPkg/Compatibility/FrameworkHiiToUefiHiiThunk/UefiIfrParser.c @@ -979,7 +979,7 @@ ParseOpCodes ( //
// check the formset GUID
//
- if (CompareMem (&FormSet->Guid, &((EFI_IFR_FORM_SET *) OpCodeData)->Guid, sizeof (EFI_GUID)) != 0) {
+ if (CompareGuid ((EFI_GUID *)(VOID *)&FormSet->Guid, (EFI_GUID *)(VOID *)&((EFI_IFR_FORM_SET *) OpCodeData)->Guid) != 0) {
return EFI_INVALID_PARAMETER;
}
diff --git a/EdkCompatibilityPkg/Compatibility/FrameworkHiiToUefiHiiThunk/Utility.c b/EdkCompatibilityPkg/Compatibility/FrameworkHiiToUefiHiiThunk/Utility.c index b0010a6f9b..810e3aff8f 100644 --- a/EdkCompatibilityPkg/Compatibility/FrameworkHiiToUefiHiiThunk/Utility.c +++ b/EdkCompatibilityPkg/Compatibility/FrameworkHiiToUefiHiiThunk/Utility.c @@ -277,7 +277,7 @@ GetFormSetGuid ( switch (OpCode->OpCode) {
case EFI_IFR_FORM_SET_OP:
FormSet = (EFI_IFR_FORM_SET *) OpCode;
- CopyMem (FormSetGuid, &FormSet->Guid, sizeof (EFI_GUID));
+ CopyGuid (FormSetGuid, (EFI_GUID *)(VOID *)&FormSet->Guid);
return;
default:
@@ -344,7 +344,7 @@ GetAttributesOfFirstFormSet ( case EFI_IFR_GUID_OP:
Class = (EFI_IFR_GUID_CLASS*) OpCode;
- if (CompareMem (&Class->Guid, &gTianoHiiIfrGuid, sizeof (EFI_GUID)) == 0) {
+ if (CompareGuid ((EFI_GUID *)(VOID *)&Class->Guid, &gTianoHiiIfrGuid) == 0) {
Class = (EFI_IFR_GUID_CLASS *) OpCode;
switch (Class->ExtendOpCode) {
@@ -497,7 +497,7 @@ CreateQuestionIdMap ( case EFI_IFR_GUID_OP:
OptionMap = (EFI_IFR_GUID_OPTIONKEY *) OpCode;
- if (CompareMem (&OptionMap->Guid, &gFrameworkHiiCompatbilityGuid, sizeof (EFI_GUID)) == 0) {
+ if (CompareGuid ((EFI_GUID *)(VOID *)&OptionMap->Guid, &gFrameworkHiiCompatbilityGuid) == 0) {
if (OptionMap->ExtendOpCode == EFI_IFR_EXTEND_OP_OPTIONKEY) {
OneOfOptinMapEntryListHead = GetOneOfOptionMapEntryListHead (ThunkContext, OptionMap->QuestionId);
if (OneOfOptinMapEntryListHead == NULL) {
@@ -525,7 +525,7 @@ CreateQuestionIdMap ( InsertTailList (OneOfOptinMapEntryListHead, &OneOfOptionMapEntry->Link);
}
- } else if (CompareMem (&OptionMap->Guid, &gTianoHiiIfrGuid, sizeof (EFI_GUID)) == 0) {
+ } else if (CompareGuid ((EFI_GUID *)(VOID *)&OptionMap->Guid, &gTianoHiiIfrGuid) == 0) {
Class = (EFI_IFR_GUID_CLASS *) OpCode;
switch (Class->ExtendOpCode) {
|