49 if ((
PcdGet8 (PcdShellProfileMask) & BIT1) == 0) {
57 if (gShellDebug1HiiHandle ==
NULL) {
58 return (EFI_DEVICE_ERROR);
102 if (gShellDebug1HiiHandle !=
NULL) {
128 ASSERT (Table !=
NULL);
137 return EFI_NOT_FOUND;
165 SetMem16 (Line,
sizeof (Line), L
' ');
168 for (Col = 1; Col <= LastCol; Col +=
ARRAY_SIZE (Line) - 1) {
170 if (Row == LastRow) {
174 Line[(LastCol - 1) % (
ARRAY_SIZE (Line) - 1)] = CHAR_NULL;
176 Line[LastCol % (
ARRAY_SIZE (Line) - 1)] = CHAR_NULL;
203 if ((Ch < 0x20) || (Ch == L
'\"') || (Ch == L
'*') || (Ch == L
'/') || (Ch == L
'<') || (Ch == L
'>') || (Ch == L
'?') || (Ch == L
'|')) {
229 for (Len = 0, Index =
StrLen (Name) - 1; Index + 1 != 0; Index--, Len++) {
230 if ((Name[Index] ==
'\\') || (Name[Index] ==
':')) {
235 if ((Len == 0) || (Len > 255)) {
242 for (Index = 0; Index <
StrLen (Name); Index++) {
271 FileNameTmp =
CatSPrint (
NULL, L
"NewFile%d.%s", Suffix, Extension);
272 if (FileNameTmp ==
NULL) {
273 ASSERT (FileNameTmp !=
NULL);
282 if (Status == EFI_NOT_FOUND) {
289 }
while (Suffix != 0);
321 OUT BOOLEAN *ReadOnly
324 VOID *InternalBuffer;
326 SHELL_FILE_HANDLE FileHandle;
331 InternalBuffer =
NULL;
338 if ((FileName ==
NULL) || (Buffer ==
NULL) || (ReadOnly ==
NULL)) {
339 return (EFI_INVALID_PARAMETER);
347 if (!EFI_ERROR (Status)) {
348 ASSERT (CreateFile ==
FALSE);
349 if (FileHandle ==
NULL) {
350 return EFI_LOAD_ERROR;
355 if (Info->
Attribute & EFI_FILE_DIRECTORY) {
357 return EFI_INVALID_PARAMETER;
360 if (Info->
Attribute & EFI_FILE_READ_ONLY) {
372 }
else if (Status == EFI_NOT_FOUND) {
376 Status =
ShellOpenFileByName (FileName, &FileHandle, EFI_FILE_MODE_READ|EFI_FILE_MODE_WRITE|EFI_FILE_MODE_CREATE, 0);
377 if (EFI_ERROR (Status)) {
384 if (Status == EFI_WARN_DELETE_FAILURE) {
385 Status = EFI_ACCESS_DENIED;
388 if (EFI_ERROR (Status)) {
408 if (InternalBuffer ==
NULL) {
409 return EFI_OUT_OF_RESOURCES;
415 Status =
ShellReadFile (FileHandle, &FileSize, InternalBuffer);
418 if (EFI_ERROR (Status)) {
419 SHELL_FREE_NON_NULL (InternalBuffer);
420 return EFI_LOAD_ERROR;
424 *Buffer = InternalBuffer;
425 if (BufferSize !=
NULL) {
426 *BufferSize = FileSize;
UINTN EFIAPI StrLen(IN CONST CHAR16 *String)
VOID *EFIAPI SetMem16(OUT VOID *Buffer, IN UINTN Length, IN UINT16 Value)
BOOLEAN EFIAPI CompareGuid(IN CONST GUID *Guid1, IN CONST GUID *Guid2)
EFI_STATUS EFIAPI BcfgLibraryUnregisterBcfgCommand(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
EFI_STATUS EFIAPI BcfgLibraryRegisterBcfgCommand(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable, IN CONST CHAR16 *Name)
SHELL_STATUS EFIAPI ShellCommandRunComp(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
SHELL_STATUS EFIAPI ShellCommandRunDblk(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
SHELL_STATUS EFIAPI ShellCommandRunDmem(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
SHELL_STATUS EFIAPI ShellCommandRunDmpStore(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
SHELL_STATUS EFIAPI ShellCommandRunEdit(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
SHELL_STATUS EFIAPI ShellCommandRunEfiCompress(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
SHELL_STATUS EFIAPI ShellCommandRunEfiDecompress(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
VOID *EFIAPI AllocateZeroPool(IN UINTN AllocationSize)
VOID EFIAPI FreePool(IN VOID *Buffer)
SHELL_STATUS EFIAPI ShellCommandRunHexEdit(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
EFI_HII_HANDLE EFIAPI HiiAddPackages(IN CONST EFI_GUID *PackageListGuid, IN EFI_HANDLE DeviceHandle OPTIONAL,...)
VOID EFIAPI HiiRemovePackages(IN EFI_HII_HANDLE HiiHandle)
SHELL_STATUS EFIAPI ShellCommandRunLoadPciRom(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
#define ARRAY_SIZE(Array)
SHELL_STATUS EFIAPI ShellCommandRunMemMap(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
SHELL_STATUS EFIAPI ShellCommandRunMm(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
SHELL_STATUS EFIAPI ShellCommandRunMode(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
#define PcdGet8(TokenName)
SHELL_STATUS EFIAPI ShellCommandRunPci(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
SHELL_STATUS EFIAPI ShellCommandRunSerMode(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
SHELL_STATUS EFIAPI ShellCommandRunSetSize(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
SHELL_STATUS EFIAPI ShellCommandRunSetVar(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
RETURN_STATUS EFIAPI ShellCommandRegisterCommandName(IN CONST CHAR16 *CommandString, IN SHELL_RUN_COMMAND CommandHandler, IN SHELL_GET_MAN_FILENAME GetManFileName, IN UINT32 ShellMinSupportLevel, IN CONST CHAR16 *ProfileName, IN CONST BOOLEAN CanAffectLE, IN CONST EFI_HII_HANDLE HiiHandle, IN CONST EFI_STRING_ID ManFormatHelp)
RETURN_STATUS EFIAPI ShellCommandRegisterAlias(IN CONST CHAR16 *Command, IN CONST CHAR16 *Alias)
EFI_FILE_INFO *EFIAPI ShellGetFileInfo(IN SHELL_FILE_HANDLE FileHandle)
EFI_STATUS EFIAPI ShellDeleteFile(IN SHELL_FILE_HANDLE *FileHandle)
EFI_STATUS EFIAPI ShellOpenFileByName(IN CONST CHAR16 *FileName, OUT SHELL_FILE_HANDLE *FileHandle, IN UINT64 OpenMode, IN UINT64 Attributes)
EFI_STATUS EFIAPI ShellFileExists(IN CONST CHAR16 *Name)
EFI_STATUS EFIAPI ShellPrintEx(IN INT32 Col OPTIONAL, IN INT32 Row OPTIONAL, IN CONST CHAR16 *Format,...)
EFI_STATUS EFIAPI ShellCloseFile(IN SHELL_FILE_HANDLE *FileHandle)
EFI_STATUS EFIAPI ShellReadFile(IN SHELL_FILE_HANDLE FileHandle, IN OUT UINTN *ReadSize, OUT VOID *Buffer)
SHELL_STATUS EFIAPI ShellCommandRunSmbiosView(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
CHAR16 *EFIAPI CatSPrint(IN CHAR16 *String OPTIONAL, IN CONST CHAR16 *FormatString,...)
EFI_STATUS EFIAPI UefiShellDebug1CommandsLibDestructor(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
EFI_STATUS GetSystemConfigurationTable(IN EFI_GUID *TableGuid, IN OUT VOID **Table)
BOOLEAN IsValidFileName(IN CONST CHAR16 *Name)
CONST CHAR16 *EFIAPI ShellCommandGetManFileNameDebug1(VOID)
CHAR16 * EditGetDefaultFileName(IN CONST CHAR16 *Extension)
BOOLEAN IsValidFileNameChar(IN CONST CHAR16 Ch)
EFI_STATUS ReadFileIntoBuffer(IN CONST CHAR16 *FileName, OUT VOID **Buffer, OUT UINTN *BufferSize OPTIONAL, OUT BOOLEAN *ReadOnly)
VOID EditorClearLine(IN UINTN Row, IN UINTN LastCol, IN UINTN LastRow)
EFI_STATUS EFIAPI UefiShellDebug1CommandsLibConstructor(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
EFI_CONFIGURATION_TABLE * ConfigurationTable
UINTN NumberOfTableEntries