diff options
author | ydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524> | 2012-08-30 10:48:17 +0000 |
---|---|---|
committer | ydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524> | 2012-08-30 10:48:17 +0000 |
commit | 3010d9efe95264ff125120da3907be114a47d327 (patch) | |
tree | 0c90afac1852ccdfb4eb1cc674dba23052c67819 /edk2/MdeModulePkg | |
parent | afd1ce0e7e45188fd8bb7d50718c47cb6fe95a84 (diff) |
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@13692 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'edk2/MdeModulePkg')
-rw-r--r-- | edk2/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/edk2/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c b/edk2/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c index c471a232a..a15cc828c 100644 --- a/edk2/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c +++ b/edk2/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c @@ -2299,30 +2299,19 @@ DiscardForm ( }
//
- // Call callback with Changed type to inform the driver.
- //
- SendDiscardInfoToDriver (FormSet, Form);
-
- //
// Prepare <ConfigResp>
//
SynchronizeStorageForForm(FormSet, ConfigInfo, FALSE);
- }
-
- Form->NvUpdateRequired = FALSE;
- } 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);
}
+ Form->NvUpdateRequired = FALSE;
+ } else if (SettingScope == FormSetLevel && IsNvUpdateRequired(FormSet)) {
+
//
// Discard Buffer storage or Name/Value storage
//
@@ -2345,6 +2334,17 @@ DiscardForm ( 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);
} else if (SettingScope == SystemLevel) {
//
|