summaryrefslogtreecommitdiff
path: root/EdkCompatibilityPkg
diff options
context:
space:
mode:
authorydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524>2012-05-10 08:00:22 +0000
committerydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524>2012-05-10 08:00:22 +0000
commit7412cb4d9185472371a738b33e3e60c2017c89d6 (patch)
tree869681cd43ae8c455060e25dba6070b98ffcbcdc /EdkCompatibilityPkg
parent7ce960e7129f6eedd2fd426f6d64f1f33cbe1154 (diff)
Enhance the logic when extract data from storage.
Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13301 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EdkCompatibilityPkg')
-rw-r--r--EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/ConfigAccess.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/ConfigAccess.c b/EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/ConfigAccess.c
index 86820ca5d..c33a3f0b8 100644
--- a/EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/ConfigAccess.c
+++ b/EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/ConfigAccess.c
@@ -3,7 +3,7 @@
by HII Thunk Modules. These Config access Protocols are used to thunk UEFI Config
Access Callback to Framework HII Callback and EFI Variable Set/Get operations.
-Copyright (c) 2008 - 2011, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2008 - 2012, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -74,9 +74,12 @@ GetFirstStorageOfFormSet (
StorageList = GetFirstNode (&FormSet->StorageListHead);
- if (!IsNull (&FormSet->StorageListHead, StorageList)) {
+ while (!IsNull (&FormSet->StorageListHead, StorageList)) {
Storage = FORMSET_STORAGE_FROM_LINK (StorageList);
- return Storage;
+ if (Storage->Type == EFI_HII_VARSTORE_BUFFER) {
+ return Storage;
+ }
+ StorageList = GetNextNode (&FormSet->StorageListHead, StorageList);
}
return NULL;
@@ -155,6 +158,10 @@ GetStorageFromConfigString (
while (!IsNull (&FormSet->StorageListHead, StorageList)) {
Storage = FORMSET_STORAGE_FROM_LINK (StorageList);
+ StorageList = GetNextNode (&FormSet->StorageListHead, StorageList);
+ if (Storage->Type != EFI_HII_VARSTORE_BUFFER) {
+ continue;
+ }
if ((Storage->VarStoreId == FormSet->DefaultVarStoreId) && (FormSet->OriginalDefaultVarStoreName != NULL)) {
Name = FormSet->OriginalDefaultVarStoreName;
@@ -165,8 +172,6 @@ GetStorageFromConfigString (
if (HiiIsConfigHdrMatch (ConfigString, &Storage->Guid, Name)) {
return Storage;
}
-
- StorageList = GetNextNode (&FormSet->StorageListHead, StorageList);
}
return NULL;
@@ -474,6 +479,12 @@ ThunkExtractConfig (
}
BufferStorage = FORMSET_STORAGE_FROM_LINK (StorageList);
StorageList = GetNextNode (&FormSetContext->StorageListHead, StorageList);
+ if (BufferStorage->Type != EFI_HII_VARSTORE_BUFFER) {
+ //
+ // BufferStorage type should be EFI_HII_VARSTORE_BUFFER
+ //
+ continue;
+ }
}
VarStoreName = NULL;