28 IN SHELL_FILE_HANDLE Handle,
35 VOID *AllocatedBuffer;
42 ReadSize =
PcdGet32 (PcdShellFileOperationSize);
44 if (AllocatedBuffer ==
NULL) {
45 return (EFI_OUT_OF_RESOURCES);
51 while (ReadSize == ((
UINTN)
PcdGet32 (PcdShellFileOperationSize))) {
52 Buffer = AllocatedBuffer;
55 if (EFI_ERROR (Status)) {
69 for (LoopVar = 0; LoopVar < LoopSize; LoopVar++) {
74 AsciiChar = CHAR_NULL;
75 AsciiChar = ((CHAR8 *)Buffer)[LoopVar];
76 if ((AsciiChar ==
'\r') || (AsciiChar ==
'\n')) {
81 if (((AsciiChar ==
'\n') && (LoopVar == 0)) ||
82 ((AsciiChar ==
'\n') && (((CHAR8 *)Buffer)[LoopVar-1] !=
'\r')))
97 if ((AsciiChar < 0x20) || (AsciiChar >= 0x7F)) {
109 Buffer = ((UINT16 *)Buffer) + 1;
110 LoopSize = (ReadSize / (
sizeof (CHAR16))) - 1;
112 LoopSize = ReadSize / (
sizeof (CHAR16));
115 for (LoopVar = 0; LoopVar < LoopSize; LoopVar++) {
120 Ucs2Char = CHAR_NULL;
121 Ucs2Char = ((CHAR16 *)Buffer)[LoopVar];
122 if ((Ucs2Char ==
'\r') || (Ucs2Char ==
'\n')) {
127 if (((Ucs2Char ==
'\n') && (LoopVar == 0)) ||
128 ((Ucs2Char ==
'\n') && (((CHAR16 *)Buffer)[LoopVar-1] !=
'\r')))
139 }
else if (Ucs2Char < 0x20) {
181 CHAR16 *ProblemParam;
208 if (EFI_ERROR (Status)) {
209 if ((Status == EFI_VOLUME_CORRUPTED) && (ProblemParam !=
NULL)) {
227 if (AsciiMode && UnicodeMode) {
247 if (EFI_ERROR (Status)) {
280 if (EFI_ERROR (Node->
Status)) {
299 if (EFI_ERROR (Status)) {
331 return (ShellStatus);
BOOLEAN EFIAPI IsNull(IN CONST LIST_ENTRY *List, IN CONST LIST_ENTRY *Node)
BOOLEAN EFIAPI IsListEmpty(IN CONST LIST_ENTRY *ListHead)
LIST_ENTRY *EFIAPI GetNextNode(IN CONST LIST_ENTRY *List, IN CONST LIST_ENTRY *Node)
LIST_ENTRY *EFIAPI GetFirstNode(IN CONST LIST_ENTRY *List)
VOID *EFIAPI ZeroMem(OUT VOID *Buffer, IN UINTN Length)
VOID *EFIAPI AllocateZeroPool(IN UINTN AllocationSize)
VOID EFIAPI FreePool(IN VOID *Buffer)
EFI_STATUS EFIAPI FileHandleIsDirectory(IN EFI_FILE_HANDLE DirHandle)
CONST UINT16 gUnicodeFileTag
#define ASSERT_EFI_ERROR(StatusParameter)
@ SHELL_INVALID_PARAMETER
#define PcdGet32(TokenName)
EFI_STATUS EFIAPI CommandInit(VOID)
BOOLEAN EFIAPI ShellGetExecutionBreakFlag(VOID)
EFI_STATUS EFIAPI ShellCloseFileMetaArg(IN OUT EFI_SHELL_FILE_INFO **ListHead)
#define ShellCommandLineParse(CheckList, CheckPackage, ProblemParam, AutoPageBreak)
Make it easy to upgrade from older versions of the shell library.
EFI_STATUS EFIAPI ShellPrintHiiEx(IN INT32 Col OPTIONAL, IN INT32 Row OPTIONAL, IN CONST CHAR8 *Language OPTIONAL, IN CONST EFI_STRING_ID HiiFormatStringId, IN CONST EFI_HII_HANDLE HiiFormatHandle,...)
BOOLEAN EFIAPI ShellCommandLineGetFlag(IN CONST LIST_ENTRY *CONST CheckPackage, IN CONST CHAR16 *CONST KeyString)
@ TypeFlag
A flag that is present or not present only (IE "-a").
EFI_STATUS EFIAPI ShellOpenFileMetaArg(IN CHAR16 *Arg, IN UINT64 OpenMode, IN OUT EFI_SHELL_FILE_INFO **ListHead)
VOID EFIAPI ShellCommandLineFreeVarList(IN LIST_ENTRY *CheckPackage)
EFI_STATUS EFIAPI ShellInitialize(VOID)
EFI_STATUS EFIAPI ShellSetFilePosition(IN SHELL_FILE_HANDLE FileHandle, IN UINT64 Position)
EFI_STATUS EFIAPI ShellPrintEx(IN INT32 Col OPTIONAL, IN INT32 Row OPTIONAL, IN CONST CHAR16 *Format,...)
CONST CHAR16 *EFIAPI ShellCommandLineGetRawValue(IN CONST LIST_ENTRY *CONST CheckPackage, IN UINTN Position)
EFI_STATUS EFIAPI ShellReadFile(IN SHELL_FILE_HANDLE FileHandle, IN OUT UINTN *ReadSize, OUT VOID *Buffer)
EFI_STATUS TypeFileByHandle(IN SHELL_FILE_HANDLE Handle, IN BOOLEAN Ascii, IN BOOLEAN UCS2)
SHELL_STATUS EFIAPI ShellCommandRunType(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
LIST_ENTRY Link
Linked list members.
SHELL_FILE_HANDLE Handle
Handle for interacting with the opened file or NULL if closed.
EFI_STATUS Status
Status of opening the file. Valid only if Handle != NULL.
CONST CHAR16 * FileName
name of this file.