summaryrefslogtreecommitdiff
path: root/IntelFrameworkModulePkg
diff options
context:
space:
mode:
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2009-04-22 03:19:42 +0000
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2009-04-22 03:19:42 +0000
commite97e2b7738e6bf739794b0df3506aabc98822570 (patch)
treeefcbc5af25d6b25493e5512d725d2245f9e6ce0a /IntelFrameworkModulePkg
parent0a1147ed7a578b8dcc4552d4da3efb9a48cea812 (diff)
downloadedk2-platforms-e97e2b7738e6bf739794b0df3506aabc98822570.tar.xz
Fix that the variable can't be stored. Next, I will update GetBrowserData API.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8147 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'IntelFrameworkModulePkg')
-rw-r--r--IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootMaint.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootMaint.c b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootMaint.c
index 982db88dbf..1e8e593059 100644
--- a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootMaint.c
+++ b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootMaint.c
@@ -272,8 +272,16 @@ BootMaintCallback (
// Retrive uncommitted data from Form Browser
//
CurrentFakeNVMap = (BMM_FAKE_NV_DATA *) HiiGetBrowserData (&mBootMaintGuid, mBootMaintStorageName, sizeof (BMM_FAKE_NV_DATA));
- if (CurrentFakeNVMap == NULL) {
- return EFI_NOT_FOUND;
+ DisMap = (UINT8 *) CurrentFakeNVMap;
+ for (Index = 0; Index < sizeof (BMM_FAKE_NV_DATA); Index ++) {
+ if (DisMap [Index] != 0) {
+ break;
+ }
+ }
+
+ if (Index == sizeof (BMM_FAKE_NV_DATA)) {
+ FreePool (CurrentFakeNVMap);
+ CurrentFakeNVMap = &Private->BmmFakeNvData;
}
//
@@ -590,7 +598,7 @@ BootMaintCallback (
//
// Update local settting.
//
- if (CurrentFakeNVMap != NULL) {
+ if (CurrentFakeNVMap != &Private->BmmFakeNvData) {
CopyMem (&Private->BmmFakeNvData, CurrentFakeNVMap, sizeof (BMM_FAKE_NV_DATA));
FreePool (CurrentFakeNVMap);
}