From f1660263de092b5596a7e97f5359877eca9cb974 Mon Sep 17 00:00:00 2001 From: ydong10 Date: Thu, 30 Aug 2012 10:48:17 +0000 Subject: Restore EditBuffer before call the callback function to avoid get error data. Signed-off-by: Eric Dong Reviewed-by: Liming Gao Reviewed-by: Ye Ting git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13692 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Universal/SetupBrowserDxe/Setup.c | 28 +++++++++++++------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'MdeModulePkg') diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c index c471a232a0..a15cc828cb 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c +++ b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c @@ -2298,31 +2298,20 @@ DiscardForm ( continue; } - // - // Call callback with Changed type to inform the driver. - // - SendDiscardInfoToDriver (FormSet, Form); - // // Prepare // 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) { // -- cgit v1.2.3