Revision: 19268
http://sourceforge.net/p/edk2/code/19268
Author: ydong10
Date: 2015-12-15 05:53:46 +0000 (Tue, 15 Dec 2015)
Log Message:
-----------
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 <[email protected]>
Reviewed-by: Eric Dong <[email protected]>
Reviewed-by: Samer El-Haj-Mahmoud <[email protected]>
Modified Paths:
--------------
trunk/edk2/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c
Modified: trunk/edk2/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c
===================================================================
--- trunk/edk2/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c
2015-12-15 05:49:14 UTC (rev 19267)
+++ trunk/edk2/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c
2015-12-15 05:53:46 UTC (rev 19268)
@@ -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,7 +2360,13 @@
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
// EFI_BROWSER_ACTION_RETRIEVE, so code place here.
@@ -2505,10 +2512,13 @@
//
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;
}
}
------------------------------------------------------------------------------
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits