After calling SendForm to enter front page, configuration change in some
driver may require system reset. Currently the reset status is saved in
SendForm level. Then SendForm can return the reset status.
IsResetRequired API also can return the reset status before exiting browser.
It return the reset status in current SendForm level now. But SendForm can
be recursive called by some module.so the reset status in previous SendForm
may be lost. Now change the IsResetRequired API to return the reset info no
matter the reset is caught in any SendForm.
Cc: Eric Dong <eric.dong@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
}\r
\r
if ((Action & BROWSER_ACTION_RESET) == BROWSER_ACTION_RESET) {\r
}\r
\r
if ((Action & BROWSER_ACTION_RESET) == BROWSER_ACTION_RESET) {\r
- gResetRequired = TRUE;\r
+ gResetRequiredFormLevel = TRUE;\r
+ gResetRequiredSystemLevel = TRUE;\r
}\r
\r
if ((Action & BROWSER_ACTION_EXIT) == BROWSER_ACTION_EXIT) {\r
}\r
\r
if ((Action & BROWSER_ACTION_EXIT) == BROWSER_ACTION_EXIT) {\r
switch (ActionRequest) {\r
case EFI_BROWSER_ACTION_REQUEST_RESET:\r
DiscardFormIsRequired = TRUE;\r
switch (ActionRequest) {\r
case EFI_BROWSER_ACTION_REQUEST_RESET:\r
DiscardFormIsRequired = TRUE;\r
- gResetRequired = TRUE;\r
+ gResetRequiredFormLevel = TRUE;\r
+ gResetRequiredSystemLevel = TRUE;\r
NeedExit = TRUE;\r
break;\r
\r
NeedExit = TRUE;\r
break;\r
\r
if ((Status == EFI_SUCCESS) && \r
(Statement->Storage == NULL)) { \r
if ((Statement->QuestionFlags & EFI_IFR_FLAG_RESET_REQUIRED) != 0) {\r
if ((Status == EFI_SUCCESS) && \r
(Statement->Storage == NULL)) { \r
if ((Statement->QuestionFlags & EFI_IFR_FLAG_RESET_REQUIRED) != 0) {\r
- gResetRequired = TRUE;\r
+ gResetRequiredFormLevel = TRUE;\r
+ gResetRequiredSystemLevel = TRUE;\r
}\r
\r
if ((Statement->QuestionFlags & EFI_IFR_FLAG_RECONNECT_REQUIRED) != 0) {\r
}\r
\r
if ((Statement->QuestionFlags & EFI_IFR_FLAG_RECONNECT_REQUIRED) != 0) {\r
LIST_ENTRY gBrowserSaveFailFormSetList = INITIALIZE_LIST_HEAD_VARIABLE (gBrowserSaveFailFormSetList);\r
\r
BOOLEAN mSystemSubmit = FALSE;\r
LIST_ENTRY gBrowserSaveFailFormSetList = INITIALIZE_LIST_HEAD_VARIABLE (gBrowserSaveFailFormSetList);\r
\r
BOOLEAN mSystemSubmit = FALSE;\r
-BOOLEAN gResetRequired;\r
+BOOLEAN gResetRequiredFormLevel;\r
+BOOLEAN gResetRequiredSystemLevel = FALSE;\r
BOOLEAN gExitRequired;\r
BOOLEAN gFlagReconnect;\r
BOOLEAN gCallbackReconnect;\r
BOOLEAN gExitRequired;\r
BOOLEAN gFlagReconnect;\r
BOOLEAN gCallbackReconnect;\r
SaveBrowserContext ();\r
\r
gFlagReconnect = FALSE;\r
SaveBrowserContext ();\r
\r
gFlagReconnect = FALSE;\r
- gResetRequired = FALSE;\r
+ gResetRequiredFormLevel = FALSE;\r
gExitRequired = FALSE;\r
gCallbackReconnect = FALSE;\r
Status = EFI_SUCCESS;\r
gExitRequired = FALSE;\r
gCallbackReconnect = FALSE;\r
Status = EFI_SUCCESS;\r
\r
if (ActionRequest != NULL) {\r
*ActionRequest = EFI_BROWSER_ACTION_REQUEST_NONE;\r
\r
if (ActionRequest != NULL) {\r
*ActionRequest = EFI_BROWSER_ACTION_REQUEST_NONE;\r
- if (gResetRequired) {\r
+ if (gResetRequiredFormLevel) {\r
*ActionRequest = EFI_BROWSER_ACTION_REQUEST_RESET;\r
}\r
}\r
*ActionRequest = EFI_BROWSER_ACTION_REQUEST_RESET;\r
}\r
}\r
//\r
if (SetFlag && OldValue && !Question->ValueChanged) {\r
if ((Question->QuestionFlags & EFI_IFR_FLAG_RESET_REQUIRED) != 0) {\r
//\r
if (SetFlag && OldValue && !Question->ValueChanged) {\r
if ((Question->QuestionFlags & EFI_IFR_FLAG_RESET_REQUIRED) != 0) {\r
- gResetRequired = TRUE;\r
+ gResetRequiredFormLevel = TRUE;\r
+ gResetRequiredSystemLevel = TRUE;\r
}\r
\r
if ((Question->QuestionFlags & EFI_IFR_FLAG_RECONNECT_REQUIRED) != 0) {\r
}\r
\r
if ((Question->QuestionFlags & EFI_IFR_FLAG_RECONNECT_REQUIRED) != 0) {\r
// Save FormBrowser context\r
//\r
Context->Selection = gCurrentSelection;\r
// Save FormBrowser context\r
//\r
Context->Selection = gCurrentSelection;\r
- Context->ResetRequired = gResetRequired;\r
+ Context->ResetRequired = gResetRequiredFormLevel;\r
Context->FlagReconnect = gFlagReconnect;\r
Context->CallbackReconnect = gCallbackReconnect;\r
Context->ExitRequired = gExitRequired;\r
Context->FlagReconnect = gFlagReconnect;\r
Context->CallbackReconnect = gCallbackReconnect;\r
Context->ExitRequired = gExitRequired;\r
// Restore FormBrowser context\r
//\r
gCurrentSelection = Context->Selection;\r
// Restore FormBrowser context\r
//\r
gCurrentSelection = Context->Selection;\r
- gResetRequired = Context->ResetRequired;\r
+ gResetRequiredFormLevel = Context->ResetRequired;\r
gFlagReconnect = Context->FlagReconnect;\r
gCallbackReconnect = Context->CallbackReconnect;\r
gExitRequired = Context->ExitRequired;\r
gFlagReconnect = Context->FlagReconnect;\r
gCallbackReconnect = Context->CallbackReconnect;\r
gExitRequired = Context->ExitRequired;\r
// Executet the reset action.\r
//\r
if ((Action & BROWSER_ACTION_RESET) != 0) {\r
// Executet the reset action.\r
//\r
if ((Action & BROWSER_ACTION_RESET) != 0) {\r
- gResetRequired = TRUE;\r
+ gResetRequiredFormLevel = TRUE;\r
+ gResetRequiredSystemLevel = TRUE;\r
- return gResetRequired;\r
+ return gResetRequiredSystemLevel;\r
/** @file\r
Private MACRO, structure and function definitions for Setup Browser module.\r
\r
/** @file\r
Private MACRO, structure and function definitions for Setup Browser module.\r
\r
-Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
\r
extern BOOLEAN gCallbackReconnect;\r
extern BOOLEAN gFlagReconnect;\r
\r
extern BOOLEAN gCallbackReconnect;\r
extern BOOLEAN gFlagReconnect;\r
-extern BOOLEAN gResetRequired;\r
+extern BOOLEAN gResetRequiredFormLevel;\r
+extern BOOLEAN gResetRequiredSystemLevel;\r
extern BOOLEAN gExitRequired;\r
extern LIST_ENTRY gBrowserFormSetList;\r
extern LIST_ENTRY gBrowserHotKeyList;\r
extern BOOLEAN gExitRequired;\r
extern LIST_ENTRY gBrowserFormSetList;\r
extern LIST_ENTRY gBrowserHotKeyList;\r