summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Library
diff options
context:
space:
mode:
authorDandan Bi <dandan.bi@intel.com>2017-04-17 16:12:48 +0800
committerHao Wu <hao.a.wu@intel.com>2017-04-18 15:56:21 +0800
commitd508fe87fe73f1e99c5e71ff2aa49459cbe68d2f (patch)
treede3a6a1f879d1bed400c4abd1a0ab93c1ecda565 /MdeModulePkg/Library
parent51de5c302fed13b110963b3863fe69d6e2a51079 (diff)
downloadedk2-d508fe87fe73f1e99c5e71ff2aa49459cbe68d2f.tar.gz
edk2-d508fe87fe73f1e99c5e71ff2aa49459cbe68d2f.tar.bz2
edk2-d508fe87fe73f1e99c5e71ff2aa49459cbe68d2f.zip
MdeModulePkg/BMMUiLib: Update codes of initializing ConsoleXXXCheck array
When initializing ConsoleOutCheck/ConsoleInCheck/ConsoleErrCheck array in BMM_FAKE_NV_DATA structure, also need to consider whether the terminal device is ConOut/ConIn/ConErr or not. Cc: Eric Dong <eric.dong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com>
Diffstat (limited to 'MdeModulePkg/Library')
-rw-r--r--MdeModulePkg/Library/BootMaintenanceManagerUiLib/ConsoleOption.c26
1 files changed, 25 insertions, 1 deletions
diff --git a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/ConsoleOption.c b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/ConsoleOption.c
index a145a77c70..b25c7a651b 100644
--- a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/ConsoleOption.c
+++ b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/ConsoleOption.c
@@ -1031,6 +1031,7 @@ GetConsoleInCheck (
BM_MENU_ENTRY *NewMenuEntry;
UINT8 *ConInCheck;
BM_CONSOLE_CONTEXT *NewConsoleContext;
+ BM_TERMINAL_CONTEXT *NewTerminalContext;
ASSERT (CallbackData != NULL);
@@ -1041,6 +1042,13 @@ GetConsoleInCheck (
NewConsoleContext = (BM_CONSOLE_CONTEXT *) NewMenuEntry->VariableContext;
ConInCheck[Index] = NewConsoleContext->IsActive;
}
+
+ for (Index = 0; Index < TerminalMenu.MenuNumber; Index++) {
+ NewMenuEntry = BOpt_GetMenuEntry (&TerminalMenu, Index);
+ NewTerminalContext = (BM_TERMINAL_CONTEXT *) NewMenuEntry->VariableContext;
+ ASSERT (Index + ConsoleInpMenu.MenuNumber < MAX_MENU_NUMBER);
+ ConInCheck[Index + ConsoleInpMenu.MenuNumber] = NewTerminalContext->IsConIn;
+ }
}
/**
@@ -1060,7 +1068,8 @@ GetConsoleOutCheck (
BM_MENU_ENTRY *NewMenuEntry;
UINT8 *ConOutCheck;
BM_CONSOLE_CONTEXT *NewConsoleContext;
-
+ BM_TERMINAL_CONTEXT *NewTerminalContext;
+
ASSERT (CallbackData != NULL);
ConOutCheck = &CallbackData->BmmFakeNvData.ConsoleOutCheck[0];
for (Index = 0; ((Index < ConsoleOutMenu.MenuNumber) && \
@@ -1069,6 +1078,13 @@ GetConsoleOutCheck (
NewConsoleContext = (BM_CONSOLE_CONTEXT *) NewMenuEntry->VariableContext;
ConOutCheck[Index] = NewConsoleContext->IsActive;
}
+
+ for (Index = 0; Index < TerminalMenu.MenuNumber; Index++) {
+ NewMenuEntry = BOpt_GetMenuEntry (&TerminalMenu, Index);
+ NewTerminalContext = (BM_TERMINAL_CONTEXT *) NewMenuEntry->VariableContext;
+ ASSERT (Index + ConsoleOutMenu.MenuNumber < MAX_MENU_NUMBER);
+ ConOutCheck[Index + ConsoleOutMenu.MenuNumber] = NewTerminalContext->IsConOut;
+ }
}
/**
@@ -1088,6 +1104,7 @@ GetConsoleErrCheck (
BM_MENU_ENTRY *NewMenuEntry;
UINT8 *ConErrCheck;
BM_CONSOLE_CONTEXT *NewConsoleContext;
+ BM_TERMINAL_CONTEXT *NewTerminalContext;
ASSERT (CallbackData != NULL);
ConErrCheck = &CallbackData->BmmFakeNvData.ConsoleErrCheck[0];
@@ -1097,6 +1114,13 @@ GetConsoleErrCheck (
NewConsoleContext = (BM_CONSOLE_CONTEXT *) NewMenuEntry->VariableContext;
ConErrCheck[Index] = NewConsoleContext->IsActive;
}
+
+ for (Index = 0; Index < TerminalMenu.MenuNumber; Index++) {
+ NewMenuEntry = BOpt_GetMenuEntry (&TerminalMenu, Index);
+ NewTerminalContext = (BM_TERMINAL_CONTEXT *) NewMenuEntry->VariableContext;
+ ASSERT (Index + ConsoleErrMenu.MenuNumber < MAX_MENU_NUMBER);
+ ConErrCheck[Index + ConsoleErrMenu.MenuNumber] = NewTerminalContext->IsStdErr;
+ }
}
/**