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
This commit is contained in:
lgao4 2009-04-22 03:19:42 +00:00
parent 0a1147ed7a
commit e97e2b7738
1 changed files with 11 additions and 3 deletions

View File

@ -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);
}