12extern BOOLEAN AsciiRedirection;
16 SHELL_FILE_HANDLE FileHandle;
18 UINT64 RemainingBytesOfInputFile;
23 SHELL_FILE_HANDLE FileHandle;
43 gBS->SignalEvent (Event);
58 IN BOOLEAN ExtendedVerification
87 if ((Key ==
NULL) || (This ==
NULL)) {
88 return (EFI_INVALID_PARAMETER);
95 return (EFI_NOT_READY);
98 Size =
sizeof (CHAR16);
100 if (!AsciiRedirection) {
101 CharSize =
sizeof (CHAR16);
103 CharSize =
sizeof (CHAR8);
116 return (ShellInfoObject.NewEfiShellProtocol->ReadFile (
135 IN SHELL_FILE_HANDLE FileHandleToUse,
141 UINT64 CurrentPosition;
144 if ((HandleLocation ==
NULL) || (FileHandleToUse ==
NULL)) {
149 if (ProtocolToReturn ==
NULL) {
159 ProtocolToReturn->RemainingBytesOfInputFile = FileSize - CurrentPosition;
160 ProtocolToReturn->FileHandle = FileHandleToUse;
164 Status =
gBS->CreateEvent (
168 &ProtocolToReturn->SimpleTextIn,
172 if (EFI_ERROR (Status)) {
178 Status =
gBS->InstallProtocolInterface (
179 &(ProtocolToReturn->TheHandle),
180 &gEfiSimpleTextInProtocolGuid,
182 &(ProtocolToReturn->SimpleTextIn)
184 if (!EFI_ERROR (Status)) {
185 *HandleLocation = ProtocolToReturn->TheHandle;
209 if (SimpleTextIn ==
NULL) {
210 return (EFI_INVALID_PARAMETER);
215 Status1 =
gBS->UninstallProtocolInterface (
217 &gEfiSimpleTextInProtocolGuid,
222 if (!EFI_ERROR (Status)) {
241 IN BOOLEAN ExtendedVerification
291 return (PassThruProtocol->QueryMode (
314 return (EFI_UNSUPPORTED);
419 Size =
StrLen (WString) *
sizeof (CHAR16);
420 return (ShellInfoObject.NewEfiShellProtocol->WriteFile (
440 IN SHELL_FILE_HANDLE FileHandleToUse,
448 if ((HandleLocation ==
NULL) || (FileHandleToUse ==
NULL)) {
453 if (ProtocolToReturn ==
NULL) {
457 ProtocolToReturn->FileHandle = FileHandleToUse;
458 ProtocolToReturn->OriginalSimpleTextOut = OriginalProtocol;
469 if (ProtocolToReturn->SimpleTextOut.
Mode ==
NULL) {
474 ProtocolToReturn->SimpleTextOut.
Mode->
MaxMode = OriginalProtocol->Mode->MaxMode;
475 ProtocolToReturn->SimpleTextOut.
Mode->
Mode = OriginalProtocol->Mode->Mode;
476 ProtocolToReturn->SimpleTextOut.
Mode->
Attribute = OriginalProtocol->Mode->Attribute;
477 ProtocolToReturn->SimpleTextOut.
Mode->
CursorColumn = OriginalProtocol->Mode->CursorColumn;
478 ProtocolToReturn->SimpleTextOut.
Mode->
CursorRow = OriginalProtocol->Mode->CursorRow;
479 ProtocolToReturn->SimpleTextOut.
Mode->
CursorVisible = OriginalProtocol->Mode->CursorVisible;
481 Status =
gBS->InstallProtocolInterface (
482 &(ProtocolToReturn->TheHandle),
483 &gEfiSimpleTextOutProtocolGuid,
485 &(ProtocolToReturn->SimpleTextOut)
487 if (!EFI_ERROR (Status)) {
488 *HandleLocation = ProtocolToReturn->TheHandle;
491 SHELL_FREE_NON_NULL (ProtocolToReturn->SimpleTextOut.
Mode);
492 SHELL_FREE_NON_NULL (ProtocolToReturn);
512 if (SimpleTextOut ==
NULL) {
513 return (EFI_INVALID_PARAMETER);
516 Status =
gBS->UninstallProtocolInterface (
518 &gEfiSimpleTextOutProtocolGuid,
UINTN EFIAPI StrLen(IN CONST CHAR16 *String)
EFI_STATUS EFIAPI FileBasedSimpleTextOutSetCursorPosition(IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, IN UINTN Column, IN UINTN Row)
EFI_STATUS EFIAPI FileBasedSimpleTextOutSetMode(IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, IN UINTN ModeNumber)
EFI_STATUS EFIAPI FileBasedSimpleTextOutEnableCursor(IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, IN BOOLEAN Visible)
EFI_STATUS EFIAPI FileBasedSimpleTextInReset(IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *This, IN BOOLEAN ExtendedVerification)
EFI_STATUS EFIAPI FileBasedSimpleTextOutReset(IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, IN BOOLEAN ExtendedVerification)
VOID EFIAPI ConInWaitForKey(IN EFI_EVENT Event, IN VOID *Context)
EFI_STATUS EFIAPI FileBasedSimpleTextOutQueryMode(IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, IN UINTN ModeNumber, OUT UINTN *Columns, OUT UINTN *Rows)
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL * CreateSimpleTextOutOnFile(IN SHELL_FILE_HANDLE FileHandleToUse, IN EFI_HANDLE *HandleLocation, IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *OriginalProtocol)
EFI_STATUS EFIAPI FileBasedSimpleTextOutOutputString(IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, IN CHAR16 *WString)
EFI_STATUS EFIAPI FileBasedSimpleTextInReadKeyStroke(IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *This, IN OUT EFI_INPUT_KEY *Key)
EFI_STATUS EFIAPI FileBasedSimpleTextOutSetAttribute(IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, IN UINTN Attribute)
EFI_STATUS CloseSimpleTextOutOnFile(IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *SimpleTextOut)
EFI_STATUS CloseSimpleTextInOnFile(IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *SimpleTextIn)
EFI_SIMPLE_TEXT_INPUT_PROTOCOL * CreateSimpleTextInOnFile(IN SHELL_FILE_HANDLE FileHandleToUse, IN EFI_HANDLE *HandleLocation)
EFI_STATUS EFIAPI FileBasedSimpleTextOutClearScreen(IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This)
EFI_STATUS EFIAPI FileBasedSimpleTextOutTestString(IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, IN CHAR16 *WString)
VOID *EFIAPI AllocateZeroPool(IN UINTN AllocationSize)
VOID EFIAPI FreePool(IN VOID *Buffer)
EFI_STATUS EFIAPI ShellGetFileSize(IN SHELL_FILE_HANDLE FileHandle, OUT UINT64 *Size)
EFI_STATUS EFIAPI ShellGetFilePosition(IN SHELL_FILE_HANDLE FileHandle, OUT UINT64 *Position)
EFI_SIMPLE_TEXT_OUTPUT_MODE * Mode