From: "Dong, Eric" <eric.dong@intel.com>
To: "Bi, Dandan" <dandan.bi@intel.com>,
"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: Re: [patch] MdeModulePkg/BMMUiLib: Update codes of initializing ConsoleXXXCheck array
Date: Tue, 18 Apr 2017 04:51:19 +0000 [thread overview]
Message-ID: <ED077930C258884BBCB450DB737E66224A93F5C4@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <1492487415-171376-1-git-send-email-dandan.bi@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
-----Original Message-----
From: Bi, Dandan
Sent: Tuesday, April 18, 2017 11:50 AM
To: edk2-devel@lists.01.org
Cc: Dong, Eric
Subject: [patch] 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>
---
.../BootMaintenanceManagerUiLib/ConsoleOption.c | 26 +++++++++++++++++++++-
1 file changed, 25 insertions(+), 1 deletion(-)
diff --git a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/ConsoleOption.c b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/ConsoleOption.c
index a145a77..b25c7a6 100644
--- a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/ConsoleOption.c
+++ b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/ConsoleOption.c
@@ -1029,20 +1029,28 @@ GetConsoleInCheck ( {
UINT16 Index;
BM_MENU_ENTRY *NewMenuEntry;
UINT8 *ConInCheck;
BM_CONSOLE_CONTEXT *NewConsoleContext;
+ BM_TERMINAL_CONTEXT *NewTerminalContext;
ASSERT (CallbackData != NULL);
ConInCheck = &CallbackData->BmmFakeNvData.ConsoleInCheck[0];
for (Index = 0; ((Index < ConsoleInpMenu.MenuNumber) && \
(Index < MAX_MENU_NUMBER)) ; Index++) {
NewMenuEntry = BOpt_GetMenuEntry (&ConsoleInpMenu, Index);
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; }
}
/**
Initialize console output device check box to ConsoleOutCheck[MAX_MENU_NUMBER] @@ -1058,19 +1066,27 @@ GetConsoleOutCheck ( {
UINT16 Index;
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) && \
(Index < MAX_MENU_NUMBER)) ; Index++) {
NewMenuEntry = BOpt_GetMenuEntry (&ConsoleOutMenu, Index);
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; }
}
/**
Initialize standard error output device check box to ConsoleErrCheck[MAX_MENU_NUMBER] @@ -1086,19 +1102,27 @@ GetConsoleErrCheck ( {
UINT16 Index;
BM_MENU_ENTRY *NewMenuEntry;
UINT8 *ConErrCheck;
BM_CONSOLE_CONTEXT *NewConsoleContext;
+ BM_TERMINAL_CONTEXT *NewTerminalContext;
ASSERT (CallbackData != NULL);
ConErrCheck = &CallbackData->BmmFakeNvData.ConsoleErrCheck[0];
for (Index = 0; ((Index < ConsoleErrMenu.MenuNumber) && \
(Index < MAX_MENU_NUMBER)) ; Index++) {
NewMenuEntry = BOpt_GetMenuEntry (&ConsoleErrMenu, Index);
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; }
}
/**
Initialize terminal attributes (baudrate, data rate, stop bits, parity and terminal type)
--
1.9.5.msysgit.1
prev parent reply other threads:[~2017-04-18 4:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-18 3:50 [patch] MdeModulePkg/BMMUiLib: Update codes of initializing ConsoleXXXCheck array Dandan Bi
2017-04-18 4:51 ` Dong, Eric [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ED077930C258884BBCB450DB737E66224A93F5C4@shsmsx102.ccr.corp.intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox