diff options
author | Cecil Sheng <cecil.sheng@hpe.com> | 2015-12-15 05:53:46 +0000 |
---|---|---|
committer | ydong10 <ydong10@Edk2> | 2015-12-15 05:53:46 +0000 |
commit | 00d1c2a35e2a85549b0b9caff604f12cbc057968 (patch) | |
tree | 41f8308a0ae8689fa259b1dee719fd8dbd2fac9e /MdeModulePkg | |
parent | 8ab3c094b37472d60ff018900cdfc5a34cf9e5a8 (diff) | |
download | edk2-platforms-00d1c2a35e2a85549b0b9caff604f12cbc057968.tar.xz |
MdeModulePkg: Improved SetupBrowser handling to failed GOTO callback.
On a failed REF_OP callback, all changed fields in the Selection should be restored.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Cecil Sheng <cecil.sheng@hpe.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19268 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg')
-rw-r--r-- | MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c b/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c index 356cd9cd9a..4c4e51d2f9 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c +++ b/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c @@ -2,6 +2,7 @@ Utility functions for UI presentation.
Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.<BR>
+(C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -2359,6 +2360,12 @@ SetupBrowser ( mCurFakeQestId = 0;
do {
+
+ //
+ // Reset Status to prevent the next break from returning incorrect error status.
+ //
+ Status = EFI_SUCCESS;
+
//
// IFR is updated, force to reparse the IFR binary
// This check is shared by EFI_BROWSER_ACTION_FORM_CLOSE and
@@ -2505,10 +2512,13 @@ SetupBrowser ( //
if (EFI_ERROR (Status)) {
//
- // Cross reference will not be taken
+ // Cross reference will not be taken, restore all essential field
//
- Selection->FormId = Selection->Form->FormId;
+ Selection->Handle = mCurrentHiiHandle;
+ CopyMem (&Selection->FormSetGuid, &mCurrentFormSetGuid, sizeof (EFI_GUID));
+ Selection->FormId = mCurrentFormId;
Selection->QuestionId = 0;
+ Selection->Action = UI_ACTION_REFRESH_FORM;
}
}
|