summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c
diff options
context:
space:
mode:
Diffstat (limited to 'MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c')
-rw-r--r--MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c30
1 files changed, 18 insertions, 12 deletions
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c b/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c
index f06b8a2..99a30bc 100644
--- a/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c
+++ b/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c
@@ -905,8 +905,6 @@ ProcessAction (
IN UINT16 DefaultId
)
{
- EFI_STATUS Status;
-
//
// This is caused by use press ESC, and it should not combine with other action type.
//
@@ -928,10 +926,7 @@ ProcessAction (
}
if ((Action & BROWSER_ACTION_SUBMIT) == BROWSER_ACTION_SUBMIT) {
- Status = SubmitForm (gCurrentSelection->FormSet, gCurrentSelection->Form, gBrowserSettingScope);
- if (EFI_ERROR (Status)) {
- PopupErrorMessage(BROWSER_SUBMIT_FAIL, NULL, NULL);
- }
+ SubmitForm (gCurrentSelection->FormSet, gCurrentSelection->Form, gBrowserSettingScope);
}
if ((Action & BROWSER_ACTION_RESET) == BROWSER_ACTION_RESET) {
@@ -1186,7 +1181,8 @@ ProcessChangedData (
IN BROWSER_SETTING_SCOPE Scope
)
{
- BOOLEAN RetValue;
+ BOOLEAN RetValue;
+ EFI_STATUS Status;
RetValue = TRUE;
switch (mFormDisplay->ConfirmDataChange()) {
@@ -1195,7 +1191,10 @@ ProcessChangedData (
break;
case BROWSER_ACTION_SUBMIT:
- SubmitForm (Selection->FormSet, Selection->Form, Scope);
+ Status = SubmitForm (Selection->FormSet, Selection->Form, Scope);
+ if (EFI_ERROR (Status)) {
+ RetValue = FALSE;
+ }
break;
case BROWSER_ACTION_NONE:
@@ -1306,7 +1305,7 @@ ProcessGotoOpCode (
//
// Not found the EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL protocol.
//
- PopupErrorMessage(BROWSER_PROTOCOL_NOT_FOUND, NULL, NULL);
+ PopupErrorMessage(BROWSER_PROTOCOL_NOT_FOUND, NULL, NULL, NULL);
FreePool (StringPtr);
return Status;
}
@@ -1383,7 +1382,7 @@ ProcessGotoOpCode (
//
// Form is suppressed.
//
- PopupErrorMessage(BROWSER_FORM_SUPPRESS, NULL, NULL);
+ PopupErrorMessage(BROWSER_FORM_SUPPRESS, NULL, NULL, NULL);
return EFI_SUCCESS;
}
}
@@ -1630,6 +1629,12 @@ DisplayForm (
gCurrentSelection->FormId, gCurrentSelection->QuestionId);
ASSERT (CurrentMenu != NULL);
}
+
+ //
+ // Back up the form view history data for this form.
+ //
+ UiCopyMenuList(&gCurrentSelection->Form->FormViewListHead, &mPrivateData.FormBrowserEx2.FormViewHistoryHead);
+
gCurrentSelection->CurrentMenu = CurrentMenu;
//
@@ -1660,6 +1665,7 @@ DisplayForm (
// and an valid value has return.
// EFI_SUCCESS: Success shows form and get user input in UserInput paramenter.
//
+ ASSERT (gDisplayFormData.BrowserStatus == BROWSER_SUCCESS);
Status = mFormDisplay->FormDisplay (&gDisplayFormData, &UserInput);
if (EFI_ERROR (Status) && Status != EFI_NOT_FOUND) {
FreeDisplayFormData();
@@ -1849,7 +1855,7 @@ FindNextMenu (
//
if ((gBrowserSettingScope == FormLevel && IsNvUpdateRequiredForForm (Selection->Form)) ||
(gBrowserSettingScope == FormSetLevel && IsNvUpdateRequiredForFormSet(Selection->FormSet) && Scope == FormSetLevel)) {
- if (!ProcessChangedData(Selection, Scope)) {
+ if (!ProcessChangedData(Selection, gBrowserSettingScope)) {
return FALSE;
}
}
@@ -2309,7 +2315,7 @@ SetupBrowser (
//
// Form is suppressed.
//
- PopupErrorMessage(BROWSER_FORM_SUPPRESS, NULL, NULL);
+ PopupErrorMessage(BROWSER_FORM_SUPPRESS, NULL, NULL, NULL);
Status = EFI_NOT_FOUND;
goto Done;
}