From: Cecil Sheng Date: Tue, 15 Dec 2015 02:53:34 +0000 (+0000) Subject: MdeModulePkg: Improved SetupBrowser handling to failed GOTO callback. X-Git-Tag: edk2-stable201903~8296 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=fb567b2f7400dc615ea8195efb33935e32a13f40 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 Reviewed-by: Eric Dong Reviewed-by: Samer El-Haj-Mahmoud git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19245 6f19259b-4bc3-4df7-8a09-765794883524 --- diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c b/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c index 356cd9cd9a..7bf91df857 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.
+(C) Copyright 2015 Hewlett Packard Enterprise Development LP
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 @@ -2505,10 +2506,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; } }