Hi Cecil, Why not also use mCurrentFormSetGuid and mCurrentHiiHandle for the guid and HiiHandle info?
Thanks, Eric -----Original Message----- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Cecil Sheng Sent: Monday, December 14, 2015 1:38 PM To: edk2-devel@lists.01.org Cc: Cecil Sheng Subject: [edk2] [PATCH] MdeModulePkg: Improved SetupBrowser handling to failed GOTO callback. On a failed REF_OP callback, all changed fields in the Selection should be restored. Signed-off-by: Cecil Sheng <cecil.sh...@hpe.com> --- MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c b/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c index 356cd9c..4301285 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 @@ -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->FormId = mCurrentFormId; Selection->QuestionId = 0; + Selection->Handle = Selection->FormSet->HiiHandle; + Selection->Action = UI_ACTION_REFRESH_FORM; + CopyMem (&Selection->FormSetGuid, &mCurrentFormSetGuid, + sizeof (EFI_GUID)); } } -- 2.6.3.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel