mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-28 16:14:04 +02:00
Refine code to remove structure assignment
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7070 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
4e16d2cd28
commit
c4f9201e2e
@ -251,7 +251,7 @@ TerminalDriverBindingStart (
|
|||||||
UINTN EntryCount;
|
UINTN EntryCount;
|
||||||
UINTN Index;
|
UINTN Index;
|
||||||
EFI_DEVICE_PATH_PROTOCOL *DevicePath;
|
EFI_DEVICE_PATH_PROTOCOL *DevicePath;
|
||||||
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL SimpleTextOutput;
|
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *SimpleTextOutput;
|
||||||
|
|
||||||
TerminalDevice = NULL;
|
TerminalDevice = NULL;
|
||||||
DefaultNode = NULL;
|
DefaultNode = NULL;
|
||||||
@ -488,54 +488,39 @@ TerminalDriverBindingStart (
|
|||||||
goto ReportError;
|
goto ReportError;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
// Simple Text Output Protocol
|
// Set Simple Text Output Protocol from template.
|
||||||
//
|
//
|
||||||
SimpleTextOutput = TerminalDevice->SimpleTextOutput;
|
SimpleTextOutput = CopyMem (
|
||||||
|
&TerminalDevice->SimpleTextOutput,
|
||||||
SimpleTextOutput.Reset = TerminalConOutReset;
|
&mTerminalDevTemplate.SimpleTextOutput,
|
||||||
SimpleTextOutput.OutputString = TerminalConOutOutputString;
|
sizeof (mTerminalDevTemplate.SimpleTextOutput)
|
||||||
SimpleTextOutput.TestString = TerminalConOutTestString;
|
);
|
||||||
SimpleTextOutput.QueryMode = TerminalConOutQueryMode;
|
SimpleTextOutput->Mode = &TerminalDevice->SimpleTextOutputMode;
|
||||||
SimpleTextOutput.SetMode = TerminalConOutSetMode;
|
|
||||||
SimpleTextOutput.SetAttribute = TerminalConOutSetAttribute;
|
|
||||||
SimpleTextOutput.ClearScreen = TerminalConOutClearScreen;
|
|
||||||
SimpleTextOutput.SetCursorPosition = TerminalConOutSetCursorPosition;
|
|
||||||
SimpleTextOutput.EnableCursor = TerminalConOutEnableCursor;
|
|
||||||
SimpleTextOutput.Mode = &TerminalDevice->SimpleTextOutputMode;
|
|
||||||
|
|
||||||
TerminalDevice->SimpleTextOutputMode.MaxMode = 3;
|
TerminalDevice->SimpleTextOutputMode.MaxMode = 3;
|
||||||
//
|
//
|
||||||
// For terminal devices, cursor is always visible
|
// For terminal devices, cursor is always visible
|
||||||
//
|
//
|
||||||
TerminalDevice->SimpleTextOutputMode.CursorVisible = TRUE;
|
TerminalDevice->SimpleTextOutputMode.CursorVisible = TRUE;
|
||||||
Status = SimpleTextOutput.SetAttribute (
|
Status = TerminalConOutSetAttribute (
|
||||||
&TerminalDevice->SimpleTextOutput,
|
SimpleTextOutput,
|
||||||
EFI_TEXT_ATTR (EFI_LIGHTGRAY, EFI_BLACK)
|
EFI_TEXT_ATTR (EFI_LIGHTGRAY, EFI_BLACK)
|
||||||
);
|
);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
goto ReportError;
|
goto ReportError;
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = SimpleTextOutput.Reset (
|
Status = TerminalConOutReset (SimpleTextOutput, FALSE);
|
||||||
&TerminalDevice->SimpleTextOutput,
|
|
||||||
FALSE
|
|
||||||
);
|
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
goto ReportError;
|
goto ReportError;
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = SimpleTextOutput.SetMode (
|
Status = TerminalConOutSetMode (SimpleTextOutput, 0);
|
||||||
&TerminalDevice->SimpleTextOutput,
|
|
||||||
0
|
|
||||||
);
|
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
goto ReportError;
|
goto ReportError;
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = SimpleTextOutput.EnableCursor (
|
Status = TerminalConOutEnableCursor (SimpleTextOutput, TRUE);
|
||||||
&TerminalDevice->SimpleTextOutput,
|
|
||||||
TRUE
|
|
||||||
);
|
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
goto ReportError;
|
goto ReportError;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user