MdeModulePkg/BM_UI: Add the new terminal types to related menu

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2186

Add the new introduced terminal types to related setup menu to change
the terminal type from setup. Most platforms would have its own
configure setup menu and they need to change it to support these.
The new introduced terminal types are Linux, XtermR6, VT400 and SCO.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
Reviewed-by: Dandan Bi <dandan.bi@intel.com>
This commit is contained in:
Zhichao Gao
2019-09-06 16:44:40 +08:00
committed by Liming Gao
parent 8a53ea9d9f
commit 590c9d5828
4 changed files with 40 additions and 34 deletions

View File

@@ -897,6 +897,7 @@ IsTerminalDevicePath (
VENDOR_DEVICE_PATH *Vendor;
UART_DEVICE_PATH *Uart;
ACPI_HID_DEVICE_PATH *Acpi;
UINTN Index;
IsTerminal = FALSE;
@@ -929,37 +930,22 @@ IsTerminalDevicePath (
}
//
// There are four kinds of Terminal types
// There are 9 kinds of Terminal types
// check to see whether this devicepath
// is one of that type
//
if (CompareGuid (&Vendor->Guid, &TerminalTypeGuid[0])) {
*Termi = TerminalTypePcAnsi;
IsTerminal = TRUE;
} else {
if (CompareGuid (&Vendor->Guid, &TerminalTypeGuid[1])) {
*Termi = TerminalTypeVt100;
IsTerminal = TRUE;
} else {
if (CompareGuid (&Vendor->Guid, &TerminalTypeGuid[2])) {
*Termi = TerminalTypeVt100Plus;
IsTerminal = TRUE;
} else {
if (CompareGuid (&Vendor->Guid, &TerminalTypeGuid[3])) {
*Termi = TerminalTypeVtUtf8;
IsTerminal = TRUE;
} else {
if (CompareGuid (&Vendor->Guid, &TerminalTypeGuid[4])) {
*Termi = TerminalTypeTtyTerm;
IsTerminal = TRUE;
} else {
IsTerminal = FALSE;
}
}
}
for (Index = 0; Index < ARRAY_SIZE (TerminalTypeGuid); Index++) {
if (CompareGuid (&Vendor->Guid, &TerminalTypeGuid[Index])) {
*Termi = Index;
IsTerminal = TRUE;
break;
}
}
if (Index == ARRAY_SIZE (TerminalTypeGuid)) {
IsTerminal = FALSE;
}
if (!IsTerminal) {
return FALSE;
}