Restore EditBuffer before call the callback function to avoid get error data.

Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13692 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
ydong10 2012-08-30 10:48:17 +00:00
parent dbcecd5da2
commit f1660263de

View File

@ -2298,31 +2298,20 @@ DiscardForm (
continue; continue;
} }
//
// Call callback with Changed type to inform the driver.
//
SendDiscardInfoToDriver (FormSet, Form);
// //
// Prepare <ConfigResp> // Prepare <ConfigResp>
// //
SynchronizeStorageForForm(FormSet, ConfigInfo, FALSE); SynchronizeStorageForForm(FormSet, ConfigInfo, FALSE);
//
// Call callback with Changed type to inform the driver.
//
SendDiscardInfoToDriver (FormSet, Form);
} }
Form->NvUpdateRequired = FALSE; Form->NvUpdateRequired = FALSE;
} else if (SettingScope == FormSetLevel && IsNvUpdateRequired(FormSet)) { } else if (SettingScope == FormSetLevel && IsNvUpdateRequired(FormSet)) {
Link = GetFirstNode (&FormSet->FormListHead);
while (!IsNull (&FormSet->FormListHead, Link)) {
Form = FORM_BROWSER_FORM_FROM_LINK (Link);
Link = GetNextNode (&FormSet->FormListHead, Link);
//
// Call callback with Changed type to inform the driver.
//
SendDiscardInfoToDriver (FormSet, Form);
}
// //
// Discard Buffer storage or Name/Value storage // Discard Buffer storage or Name/Value storage
// //
@ -2345,6 +2334,17 @@ DiscardForm (
SynchronizeStorage(Storage, FALSE); SynchronizeStorage(Storage, FALSE);
} }
Link = GetFirstNode (&FormSet->FormListHead);
while (!IsNull (&FormSet->FormListHead, Link)) {
Form = FORM_BROWSER_FORM_FROM_LINK (Link);
Link = GetNextNode (&FormSet->FormListHead, Link);
//
// Call callback with Changed type to inform the driver.
//
SendDiscardInfoToDriver (FormSet, Form);
}
UpdateNvInfoInForm (FormSet, FALSE); UpdateNvInfoInForm (FormSet, FALSE);
} else if (SettingScope == SystemLevel) { } else if (SettingScope == SystemLevel) {
// //