10#ifndef __EFI_SHELL_PROTOCOL_H__
11#define __EFI_SHELL_PROTOCOL_H__
15#define EFI_SHELL_PROTOCOL_GUID \
17 0x6302d008, 0x7f9b, 0x4f30, { 0x87, 0xac, 0x60, 0xc9, 0xfe, 0xf5, 0xda, 0x4e } \
19typedef VOID *SHELL_FILE_HANDLE;
188 IN SHELL_FILE_HANDLE FileHandle
231 IN UINT64 FileAttribs,
232 OUT SHELL_FILE_HANDLE *FileHandle
250 IN SHELL_FILE_HANDLE FileHandle
370 IN SHELL_FILE_HANDLE FileDirHandle,
392 IN SHELL_FILE_HANDLE FileHandle
431 IN CONST CHAR16 *FileSystemMapping OPTIONAL
434typedef UINT32 EFI_SHELL_DEVICE_NAME_FLAGS;
435#define EFI_DEVICE_NAME_USE_COMPONENT_NAME 0x00000001
436#define EFI_DEVICE_NAME_USE_DEVICE_PATH 0x00000002
472 IN EFI_SHELL_DEVICE_NAME_FLAGS Flags,
474 OUT CHAR16 **BestDeviceName
568 OUT UINT32 *Attributes OPTIONAL
585 IN SHELL_FILE_HANDLE FileHandle
622 IN SHELL_FILE_HANDLE FileHandle,
640 IN SHELL_FILE_HANDLE FileHandle,
722 OUT CHAR16 **HelpText
835 OUT SHELL_FILE_HANDLE *FileHandle,
882 OUT SHELL_FILE_HANDLE *FileHandle
904 OUT SHELL_FILE_HANDLE *FileHandle
929 IN SHELL_FILE_HANDLE FileHandle,
1019 OUT BOOLEAN *Volatile OPTIONAL
1103 IN SHELL_FILE_HANDLE FileHandle,
1125 IN SHELL_FILE_HANDLE FileHandle,
1175 IN SHELL_FILE_HANDLE FileHandle,
1245 UINT32 MajorVersion;
1246 UINT32 MinorVersion;
1254extern EFI_GUID gEfiShellProtocolGuid;
1257 SHELL_MAJOR_VERSION = 2,
1258 SHELL_MINOR_VERSION = 2
BOOLEAN(EFIAPI * EFI_SHELL_IS_ROOT_SHELL)(VOID)
CHAR16 *(EFIAPI * EFI_SHELL_GET_FILE_PATH_FROM_DEVICE_PATH)(IN CONST EFI_DEVICE_PATH_PROTOCOL *Path)
EFI_STATUS(EFIAPI * EFI_SHELL_OPEN_ROOT)(IN EFI_DEVICE_PATH_PROTOCOL *DevicePath, OUT SHELL_FILE_HANDLE *FileHandle)
@ SHELL_SECURITY_VIOLATION
@ SHELL_INVALID_PARAMETER
@ SHELL_INCOMPATIBLE_VERSION
BOOLEAN(EFIAPI * EFI_SHELL_BATCH_IS_ACTIVE)(VOID)
CONST EFI_DEVICE_PATH_PROTOCOL *(EFIAPI * EFI_SHELL_GET_DEVICE_PATH_FROM_MAP)(IN CONST CHAR16 *Mapping)
EFI_STATUS(EFIAPI * EFI_SHELL_OPEN_FILE_BY_NAME)(IN CONST CHAR16 *FileName, OUT SHELL_FILE_HANDLE *FileHandle, IN UINT64 OpenMode)
EFI_STATUS(EFIAPI * EFI_SHELL_GET_DEVICE_NAME)(IN EFI_HANDLE DeviceHandle, IN EFI_SHELL_DEVICE_NAME_FLAGS Flags, IN CHAR8 *Language, OUT CHAR16 **BestDeviceName)
EFI_STATUS(EFIAPI * EFI_SHELL_OPEN_FILE_LIST)(IN CHAR16 *Path, IN UINT64 OpenMode, IN OUT EFI_SHELL_FILE_INFO **FileList)
EFI_STATUS(EFIAPI * EFI_SHELL_SET_MAP)(IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath, IN CONST CHAR16 *Mapping)
EFI_STATUS(EFIAPI * EFI_SHELL_FREE_FILE_LIST)(IN EFI_SHELL_FILE_INFO **FileList)
EFI_FILE_INFO *(EFIAPI * EFI_SHELL_GET_FILE_INFO)(IN SHELL_FILE_HANDLE FileHandle)
EFI_STATUS(EFIAPI * EFI_SHELL_SET_FILE_INFO)(IN SHELL_FILE_HANDLE FileHandle, IN CONST EFI_FILE_INFO *FileInfo)
EFI_STATUS(EFIAPI * EFI_SHELL_CLOSE_FILE)(IN SHELL_FILE_HANDLE FileHandle)
EFI_STATUS(EFIAPI * EFI_SHELL_SET_CUR_DIR)(IN CONST CHAR16 *FileSystem OPTIONAL, IN CONST CHAR16 *Dir)
EFI_STATUS(EFIAPI * EFI_SHELL_OPEN_ROOT_BY_HANDLE)(IN EFI_HANDLE DeviceHandle, OUT SHELL_FILE_HANDLE *FileHandle)
EFI_STATUS(EFIAPI * EFI_SHELL_FIND_FILES_IN_DIR)(IN SHELL_FILE_HANDLE FileDirHandle, OUT EFI_SHELL_FILE_INFO **FileList)
EFI_STATUS(EFIAPI * EFI_SHELL_REGISTER_GUID_NAME)(IN CONST EFI_GUID *Guid, IN CONST CHAR16 *GuidName)
CONST CHAR16 *(EFIAPI * EFI_SHELL_GET_CUR_DIR)(IN CONST CHAR16 *FileSystemMapping OPTIONAL)
CONST CHAR16 *(EFIAPI * EFI_SHELL_GET_ALIAS)(IN CONST CHAR16 *Alias, OUT BOOLEAN *Volatile OPTIONAL)
BOOLEAN(EFIAPI * EFI_SHELL_GET_PAGE_BREAK)(VOID)
VOID(EFIAPI * EFI_SHELL_ENABLE_PAGE_BREAK)(VOID)
CONST CHAR16 *(EFIAPI * EFI_SHELL_GET_ENV)(IN CONST CHAR16 *Name OPTIONAL)
EFI_STATUS(EFIAPI * EFI_SHELL_WRITE_FILE)(IN SHELL_FILE_HANDLE FileHandle, IN OUT UINTN *BufferSize, IN VOID *Buffer)
VOID(EFIAPI * EFI_SHELL_DISABLE_PAGE_BREAK)(VOID)
EFI_STATUS(EFIAPI * EFI_SHELL_REMOVE_DUP_IN_FILE_LIST)(IN EFI_SHELL_FILE_INFO **FileList)
EFI_DEVICE_PATH_PROTOCOL *(EFIAPI * EFI_SHELL_GET_DEVICE_PATH_FROM_FILE_PATH)(IN CONST CHAR16 *Path)
EFI_STATUS(EFIAPI * EFI_SHELL_FIND_FILES)(IN CONST CHAR16 *FilePattern, OUT EFI_SHELL_FILE_INFO **FileList)
EFI_STATUS(EFIAPI * EFI_SHELL_EXECUTE)(IN EFI_HANDLE *ParentImageHandle, IN CHAR16 *CommandLine OPTIONAL, IN CHAR16 **Environment OPTIONAL, OUT EFI_STATUS *StatusCode OPTIONAL)
EFI_STATUS(EFIAPI * EFI_SHELL_CREATE_FILE)(IN CONST CHAR16 *FileName, IN UINT64 FileAttribs, OUT SHELL_FILE_HANDLE *FileHandle)
EFI_STATUS(EFIAPI * EFI_SHELL_GET_FILE_POSITION)(IN SHELL_FILE_HANDLE FileHandle, OUT UINT64 *Position)
EFI_STATUS(EFIAPI * EFI_SHELL_GET_HELP_TEXT)(IN CONST CHAR16 *Command, IN CONST CHAR16 *Sections OPTIONAL, OUT CHAR16 **HelpText)
EFI_STATUS(EFIAPI * EFI_SHELL_DELETE_FILE)(IN SHELL_FILE_HANDLE FileHandle)
EFI_STATUS(EFIAPI * EFI_SHELL_READ_FILE)(IN SHELL_FILE_HANDLE FileHandle, IN OUT UINTN *ReadSize, IN OUT VOID *Buffer)
EFI_STATUS(EFIAPI * EFI_SHELL_SET_FILE_POSITION)(IN SHELL_FILE_HANDLE FileHandle, IN UINT64 Position)
EFI_STATUS(EFIAPI * EFI_SHELL_GET_GUID_NAME)(IN CONST EFI_GUID *Guid, OUT CONST CHAR16 **GuidName)
EFI_STATUS(EFIAPI * EFI_SHELL_SET_ENV)(IN CONST CHAR16 *Name, IN CONST CHAR16 *Value, IN BOOLEAN Volatile)
EFI_STATUS(EFIAPI * EFI_SHELL_GET_FILE_SIZE)(IN SHELL_FILE_HANDLE FileHandle, OUT UINT64 *Size)
CONST CHAR16 *(EFIAPI * EFI_SHELL_GET_ENV_EX)(IN CONST CHAR16 *Name, OUT UINT32 *Attributes OPTIONAL)
EFI_STATUS(EFIAPI * EFI_SHELL_SET_ALIAS)(IN CONST CHAR16 *Command, IN CONST CHAR16 *Alias, IN BOOLEAN Replace, IN BOOLEAN Volatile)
EFI_STATUS(EFIAPI * EFI_SHELL_DELETE_FILE_BY_NAME)(IN CONST CHAR16 *FileName)
CONST CHAR16 *(EFIAPI * EFI_SHELL_GET_MAP_FROM_DEVICE_PATH)(IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath)
EFI_STATUS(EFIAPI * EFI_SHELL_FLUSH_FILE)(IN SHELL_FILE_HANDLE FileHandle)
EFI_STATUS(EFIAPI * EFI_SHELL_GET_GUID_FROM_NAME)(IN CONST CHAR16 *GuidName, OUT EFI_GUID *Guid)
EFI_FILE_INFO * FileInfo(IN EFI_FILE_HANDLE FHand)
LIST_ENTRY Link
Linked list members.
SHELL_FILE_HANDLE Handle
Handle for interacting with the opened file or NULL if closed.
EFI_FILE_INFO * Info
Pointer to the FileInfo struct for this file or NULL.
EFI_STATUS Status
Status of opening the file. Valid only if Handle != NULL.
CONST CHAR16 * FullName
Fully qualified filename.
CONST CHAR16 * FileName
name of this file.