TianoCore EDK2 master
Loading...
Searching...
No Matches
EfiShellEnvironment2.h File Reference

Go to the source code of this file.

Data Structures

struct  SHELL_FILE_ARG
 
struct  HANDLE_ENUMERATOR
 
struct  PROTOCOL_INFO
 
struct  PROTOCOL_INFO_ENUMERATOR
 
struct  EFI_SHELL_ENVIRONMENT2
 EFI_SHELL_ENVIRONMENT2 protocol structure. More...
 

Macros

#define DEFAULT_INIT_ROW   1
 
#define DEFAULT_AUTO_LF   FALSE
 
#define SHELL_FILE_ARG_SIGNATURE   SIGNATURE_32 ('g', 'r', 'a', 'f')
 Signature for SHELL_FILE_ARG.
 
#define SHELL_ENVIRONMENT_PROTOCOL_GUID
 
#define EFI_SE_EXT_SIGNATURE_GUID
 
#define EFI_SHELL_MAJOR_VER   0x00000001
 Major version of the EFI_SHELL_ENVIRONMENT2.
 
#define EFI_SHELL_MINOR_VER   0x00000000
 Minor version of the EFI_SHELL_ENVIRONMENT2.
 
#define PROTOCOL_INFO_SIGNATURE   SIGNATURE_32 ('s', 'p', 'i', 'n')
 
#define EFI_SHELL_COMPATIBLE_MODE_VER   L"1.1.1"
 The string for lowest version this shell supports.
 
#define EFI_SHELL_ENHANCED_MODE_VER   L"1.1.2"
 The string for highest version this shell supports.
 

Typedefs

typedef VOID(EFIAPI * SHELLENV_DUMP_PROTOCOL_INFO) (IN EFI_HANDLE Handle, IN VOID *Interface)
 
typedef EFI_STATUS(EFIAPI * SHELLENV_INTERNAL_COMMAND) (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 
typedef EFI_STATUS(EFIAPI * SHELLCMD_GET_LINE_HELP) (IN OUT CHAR16 **Str)
 
typedef EFI_STATUS(EFIAPI * SHELLENV_EXECUTE) (IN EFI_HANDLE *ParentImageHandle, IN CHAR16 *CommandLine, IN BOOLEAN DebugOutput)
 
typedef CHAR16 *(EFIAPI * SHELLENV_GET_ENV) (IN CHAR16 *Name)
 
typedef CHAR16 *(EFIAPI * SHELLENV_GET_MAP) (IN CHAR16 *Name)
 
typedef EFI_STATUS(EFIAPI * SHELLENV_ADD_CMD) (IN SHELLENV_INTERNAL_COMMAND Handler, IN CHAR16 *Cmd, IN SHELLCMD_GET_LINE_HELP GetLineHelp)
 
typedef VOID(EFIAPI * SHELLENV_ADD_PROT) (IN EFI_GUID *Protocol, IN SHELLENV_DUMP_PROTOCOL_INFO DumpToken OPTIONAL, IN SHELLENV_DUMP_PROTOCOL_INFO DumpInfo OPTIONAL, IN CHAR16 *IdString)
 
typedef CHAR16 *(EFIAPI * SHELLENV_GET_PROT) (IN EFI_GUID *Protocol, IN BOOLEAN GenId)
 
typedef CHAR16 *(EFIAPI * SHELLENV_CUR_DIR) (IN CHAR16 *DeviceName OPTIONAL)
 
typedef EFI_STATUS(EFIAPI * SHELLENV_FILE_META_ARG) (IN CHAR16 *Arg, IN OUT LIST_ENTRY *ListHead)
 
typedef EFI_STATUS(EFIAPI * SHELLENV_FREE_FILE_LIST) (IN OUT LIST_ENTRY *ListHead)
 
typedef EFI_SHELL_INTERFACE *(EFIAPI * SHELLENV_NEW_SHELL) (IN EFI_HANDLE ImageHandle)
 
typedef BOOLEAN(EFIAPI * SHELLENV_BATCH_IS_ACTIVE) (VOID)
 
typedef VOID(EFIAPI * SHELLENV_FREE_RESOURCES) (VOID)
 
typedef VOID(EFIAPI * SHELLENV_ENABLE_PAGE_BREAK) (IN INT32 StartRow, IN BOOLEAN AutoWrap)
 
typedef VOID(EFIAPI * SHELLENV_DISABLE_PAGE_BREAK) (VOID)
 
typedef BOOLEAN(EFIAPI * SHELLENV_GET_PAGE_BREAK) (VOID)
 
typedef VOID(EFIAPI * SHELLENV_SET_KEY_FILTER) (IN UINT32 KeyFilter)
 
typedef UINT32(EFIAPI * SHELLENV_GET_KEY_FILTER) (VOID)
 
typedef BOOLEAN(EFIAPI * SHELLENV_GET_EXECUTION_BREAK) (VOID)
 
typedef VOID(EFIAPI * SHELLENV_INCREMENT_SHELL_NESTING_LEVEL) (VOID)
 
typedef VOID(EFIAPI * SHELLENV_DECREMENT_SHELL_NESTING_LEVEL) (VOID)
 
typedef BOOLEAN(EFIAPI * SHELLENV_IS_ROOT_SHELL) (VOID)
 
typedef VOID(EFIAPI * SHELLENV_CLOSE_CONSOLE_PROXY) (IN EFI_HANDLE ConInHandle, IN OUT EFI_SIMPLE_TEXT_INPUT_PROTOCOL **ConIn, IN EFI_HANDLE ConOutHandle, IN OUT EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL **ConOut)
 
typedef VOID(EFIAPI * INIT_HANDLE_ENUMERATOR) (VOID)
 
typedef EFI_STATUS(EFIAPI * NEXT_HANDLE) (IN OUT EFI_HANDLE **Handle)
 
typedef EFI_STATUS(EFIAPI * SKIP_HANDLE) (IN UINTN SkipNum)
 
typedef UINTN(EFIAPI * RESET_HANDLE_ENUMERATOR) (IN UINTN EnumIndex)
 
typedef VOID(EFIAPI * CLOSE_HANDLE_ENUMERATOR) (VOID)
 
typedef UINTN(EFIAPI * GET_NUM) (VOID)
 
typedef VOID(EFIAPI * INIT_PROTOCOL_INFO_ENUMERATOR) (VOID)
 
typedef EFI_STATUS(EFIAPI * NEXT_PROTOCOL_INFO) (IN OUT PROTOCOL_INFO **ProtocolInfo)
 
typedef EFI_STATUS(EFIAPI * SKIP_PROTOCOL_INFO) (IN UINTN SkipNum)
 
typedef VOID(EFIAPI * RESET_PROTOCOL_INFO_ENUMERATOR) (VOID)
 
typedef VOID(EFIAPI * CLOSE_PROTOCOL_INFO_ENUMERATOR) (VOID)
 
typedef EFI_STATUS(EFIAPI * GET_DEVICE_NAME) (IN EFI_HANDLE DeviceHandle, IN BOOLEAN UseComponentName, IN BOOLEAN UseDevicePath, IN CHAR8 *Language, IN OUT CHAR16 **BestDeviceName, OUT EFI_STATUS *ConfigurationStatus, OUT EFI_STATUS *DiagnosticsStatus, IN BOOLEAN Display, IN UINTN Indent)
 
typedef EFI_STATUS(EFIAPI * GET_SHELL_MODE) (OUT CHAR16 **Mode)
 
typedef EFI_DEVICE_PATH_PROTOCOL *(EFIAPI * SHELLENV_NAME_TO_PATH) (IN CHAR16 *Path)
 
typedef EFI_STATUS(EFIAPI * SHELLENV_GET_FS_NAME) (IN EFI_DEVICE_PATH_PROTOCOL *DevPath, IN BOOLEAN ConsistMapping, OUT CHAR16 **Name)
 
typedef EFI_STATUS(EFIAPI * SHELLENV_FILE_META_ARG_NO_WILDCARD) (IN CHAR16 *Arg, IN OUT LIST_ENTRY *ListHead)
 
typedef EFI_STATUS(EFIAPI * SHELLENV_DEL_DUP_FILE) (IN LIST_ENTRY *ListHead)
 
typedef EFI_STATUS(EFIAPI * SHELLENV_GET_FS_DEVICE_PATH) (IN CHAR16 *Name, OUT EFI_DEVICE_PATH_PROTOCOL **DevPath)
 

Variables

EFI_GUID gEfiShellEnvironment2Guid
 
EFI_GUID gEfiShellEnvironment2ExtGuid
 

Detailed Description

Defines for EFI shell environment 2 ported to EDK II build environment. (no spec)

Copyright (c) 2005 - 2010, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file EfiShellEnvironment2.h.

Macro Definition Documentation

◆ DEFAULT_AUTO_LF

#define DEFAULT_AUTO_LF   FALSE

Definition at line 13 of file EfiShellEnvironment2.h.

◆ DEFAULT_INIT_ROW

#define DEFAULT_INIT_ROW   1

Definition at line 12 of file EfiShellEnvironment2.h.

◆ EFI_SE_EXT_SIGNATURE_GUID

#define EFI_SE_EXT_SIGNATURE_GUID
Value:
{ \
0xd2c18636, 0x40e5, 0x4eb5, {0xa3, 0x1b, 0x36, 0x69, 0x5f, 0xd4, 0x2c, 0x87} \
}

GUID for the shell environment2 extension (main GUID above).

Definition at line 102 of file EfiShellEnvironment2.h.

◆ EFI_SHELL_COMPATIBLE_MODE_VER

#define EFI_SHELL_COMPATIBLE_MODE_VER   L"1.1.1"

The string for lowest version this shell supports.

Definition at line 766 of file EfiShellEnvironment2.h.

◆ EFI_SHELL_ENHANCED_MODE_VER

#define EFI_SHELL_ENHANCED_MODE_VER   L"1.1.2"

The string for highest version this shell supports.

Definition at line 767 of file EfiShellEnvironment2.h.

◆ EFI_SHELL_MAJOR_VER

#define EFI_SHELL_MAJOR_VER   0x00000001

Major version of the EFI_SHELL_ENVIRONMENT2.

Definition at line 107 of file EfiShellEnvironment2.h.

◆ EFI_SHELL_MINOR_VER

#define EFI_SHELL_MINOR_VER   0x00000000

Minor version of the EFI_SHELL_ENVIRONMENT2.

Definition at line 108 of file EfiShellEnvironment2.h.

◆ PROTOCOL_INFO_SIGNATURE

#define PROTOCOL_INFO_SIGNATURE   SIGNATURE_32 ('s', 'p', 'i', 'n')

Signature for the PROTOCOL_INFO structure.

Definition at line 604 of file EfiShellEnvironment2.h.

◆ SHELL_ENVIRONMENT_PROTOCOL_GUID

#define SHELL_ENVIRONMENT_PROTOCOL_GUID
Value:
{ \
0x47c7b221, 0xc42a, 0x11d2, {0x8e, 0x57, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} \
}

GUID for the shell environment2 and shell environment.

Definition at line 94 of file EfiShellEnvironment2.h.

◆ SHELL_FILE_ARG_SIGNATURE

#define SHELL_FILE_ARG_SIGNATURE   SIGNATURE_32 ('g', 'r', 'a', 'f')

Signature for SHELL_FILE_ARG.

Definition at line 89 of file EfiShellEnvironment2.h.

Typedef Documentation

◆ CLOSE_HANDLE_ENUMERATOR

typedef VOID(EFIAPI * CLOSE_HANDLE_ENUMERATOR) (VOID)

This is an internal shell function to enumerate the handle database.

This must be called after INIT_HANDLE_ENUMERATOR.

This function releases all memory and resources associated with the handle database. After this no other handle enumerator functions except INIT_HANDLE_ENUMERATOR will function properly.

Definition at line 569 of file EfiShellEnvironment2.h.

◆ CLOSE_PROTOCOL_INFO_ENUMERATOR

typedef VOID(EFIAPI * CLOSE_PROTOCOL_INFO_ENUMERATOR) (VOID)

This function is an internal shell function for enumeration of protocols.

This must be called after INIT_PROTOCOL_INFO_ENUMERATOR. After this call no protocol enumerator calls except INIT_PROTOCOL_INFO_ENUMERATOR may be made.

This function frees any memory or resources associated with the protocol enumerator.

Definition at line 705 of file EfiShellEnvironment2.h.

◆ GET_DEVICE_NAME

typedef EFI_STATUS(EFIAPI * GET_DEVICE_NAME) (IN EFI_HANDLE DeviceHandle, IN BOOLEAN UseComponentName, IN BOOLEAN UseDevicePath, IN CHAR8 *Language, IN OUT CHAR16 **BestDeviceName, OUT EFI_STATUS *ConfigurationStatus, OUT EFI_STATUS *DiagnosticsStatus, IN BOOLEAN Display, IN UINTN Indent)

This function is used to retrieve a user-friendly display name for a handle.

If UseComponentName is TRUE then the component name protocol for this device or it's parent device (if required) will be used to obtain the name of the device. If UseDevicePath is TRUE it will get the human readable device path and return that. If both are TRUE it will try to use component name first and device path if that fails.

It will use either ComponentName or ComponentName2 protocol, depending on what is present.

This function will furthur verify whether the handle in question produced either EFI_DRIVER_CONFIGRATION_PROTOCOL or EFI_DRIVER_CONFIGURATION2_PROTOCOL and also whether the handle in question produced either EFI_DRIVER_DIAGNOSTICS_PROTOCOL or EFI_DRIVER_DIAGNOSTICS2_PROTOCOL.

Upon successful return, the memory for *BestDeviceName is up to the caller to free.

Parameters
[in]DeviceHandleThe device handle whose name is desired.
[in]UseComponentNameWhether to use the ComponentName protocol at all.
[in]UseDevicePathWhether to use the DevicePath protocol at all.
[in]LanguageThe pointer to the language string to use.
[in,out]BestDeviceNameThe pointer to pointer to string allocated with the name.
[out]ConfigurationStatusThe pointer to status for opening a Configuration protocol.
[out]DiagnosticsStatusThe pointer to status for opening a Diagnostics protocol.
[in]DisplayWhether to Print this out to default Print location.
[in]IndentHow many characters to indent the printing.
Return values
EFI_SUCCESSThis function always returns EFI_SUCCESS.

Definition at line 753 of file EfiShellEnvironment2.h.

◆ GET_NUM

typedef UINTN(EFIAPI * GET_NUM) (VOID)

This is an internal shell function to enumerate the handle database.

This function returns the number of handles in the handle database.

This must be called after INIT_HANDLE_ENUMERATOR and before CLOSE_HANDLE_ENUMERATOR.

Returns
The number of handles in the handle database.

Definition at line 584 of file EfiShellEnvironment2.h.

◆ GET_SHELL_MODE

typedef EFI_STATUS(EFIAPI * GET_SHELL_MODE) (OUT CHAR16 **Mode)

This function gets the shell mode as stored in the shell environment "efishellmode". It will not fail.

Parameters
[out]ModeReturns a string representing one of the 2 supported modes of the shell.
Return values
EFI_SUCCESSThis function always returns success.

Definition at line 779 of file EfiShellEnvironment2.h.

◆ INIT_HANDLE_ENUMERATOR

typedef VOID(EFIAPI * INIT_HANDLE_ENUMERATOR) (VOID)

For ease of use the shell maps handle #'s to short numbers. This is only done on request for various internal commands and the references are immediately freed when the internal command completes.

Definition at line 495 of file EfiShellEnvironment2.h.

◆ INIT_PROTOCOL_INFO_ENUMERATOR

typedef VOID(EFIAPI * INIT_PROTOCOL_INFO_ENUMERATOR) (VOID)

This is an internal shell function to initialize the protocol enumerator.

This must be called before NEXT_PROTOCOL_INFO, SKIP_PROTOCOL_INFO, RESET_PROTOCOL_INFO_ENUMERATOR, and CLOSE_PROTOCOL_INFO_ENUMERATOR are called.

Definition at line 638 of file EfiShellEnvironment2.h.

◆ NEXT_HANDLE

typedef EFI_STATUS(EFIAPI * NEXT_HANDLE) (IN OUT EFI_HANDLE **Handle)

This is an internal shell function to enumerate the handle database.

This function gets the next handle in the handle database. If no handles are found, EFI_NOT_FOUND is returned. If the previous Handle was the last handle, it is set to NULL before returning.

This must be called after INIT_HANDLE_ENUMERATOR and before CLOSE_HANDLE_ENUMERATOR.

Parameters
[in,out]HandleThe pointer to pointer to Handle. It is set on a successful return.
Return values
EFI_SUCCESSThe next handle in the handle database is *Handle.
EFI_NOT_FOUNDThere is not another handle.

Definition at line 516 of file EfiShellEnvironment2.h.

◆ NEXT_PROTOCOL_INFO

typedef EFI_STATUS(EFIAPI * NEXT_PROTOCOL_INFO) (IN OUT PROTOCOL_INFO **ProtocolInfo)

This function is an internal shell function for enumeration of protocols.

This function returns the next protocol on the list. If this is called immediately after initialization, it will return the first protocol on the list. If this is called immediately after reset, it will return the first protocol again.

This cannot be called after CLOSE_PROTOCOL_INFO_ENUMERATOR, but it must be called after INIT_PROTOCOL_INFO_ENUMERATOR.

Parameters
[in,out]ProtocolInfoThe pointer to pointer to protocol information structure.
Return values
EFI_SUCCESSThe next protocol's information was successfully returned.
NULLThere are no more protocols.

Definition at line 659 of file EfiShellEnvironment2.h.

◆ RESET_HANDLE_ENUMERATOR

typedef UINTN(EFIAPI * RESET_HANDLE_ENUMERATOR) (IN UINTN EnumIndex)

This is an internal shell function to enumerate the handle database.

This function resets the the handle database so that NEXT_HANDLE and SKIP_HANDLE will start from EnumIndex on the next call.

This must be called after INIT_HANDLE_ENUMERATOR and before CLOSE_HANDLE_ENUMERATOR.

Parameters
[in]EnumIndexWhere to start.
Returns
The number of handles either read out or skipped before this reset.

Definition at line 554 of file EfiShellEnvironment2.h.

◆ RESET_PROTOCOL_INFO_ENUMERATOR

typedef VOID(EFIAPI * RESET_PROTOCOL_INFO_ENUMERATOR) (VOID)

This function is an internal shell function for enumeration of protocols.

This cannot be called after CLOSE_PROTOCOL_INFO_ENUMERATOR, but it must be called after INIT_PROTOCOL_INFO_ENUMERATOR.

This function resets the list of protocols such that the next one in the list is the beginning of the list.

Definition at line 690 of file EfiShellEnvironment2.h.

◆ SHELLCMD_GET_LINE_HELP

typedef EFI_STATUS(EFIAPI * SHELLCMD_GET_LINE_HELP) (IN OUT CHAR16 **Str)

This function is a prototype for one that gets a help string for a given command. This is used when programatically adding shell commands. Upon successful return the memory allocated is up to the caller to free.

Parameters
[in,out]StrPointer to pointer to string to display for help.
Return values
EFI_SUCCESSThe help string is in the parameter Str.

Definition at line 63 of file EfiShellEnvironment2.h.

◆ SHELLENV_ADD_CMD

typedef EFI_STATUS(EFIAPI * SHELLENV_ADD_CMD) (IN SHELLENV_INTERNAL_COMMAND Handler, IN CHAR16 *Cmd, IN SHELLCMD_GET_LINE_HELP GetLineHelp)

This function will add an internal command to the shell interface.

This will allocate all required memory, put the new command on the command list in the correct location.

Parameters
[in]HandlerThe handler function to call when the command gets called.
[in]CmdThe command name.
[in]GetLineHelpThe function to call of type "get help" for this command.
Return values
EFI_SUCCESSThe command is now part of the command list.
EFI_OUT_OF_RESOURCESA memory allocation failed.
See also
SHELLENV_INTERNAL_COMMAND
SHELLCMD_GET_LINE_HELP

Definition at line 185 of file EfiShellEnvironment2.h.

◆ SHELLENV_ADD_PROT

typedef VOID(EFIAPI * SHELLENV_ADD_PROT) (IN EFI_GUID *Protocol, IN SHELLENV_DUMP_PROTOCOL_INFO DumpToken OPTIONAL, IN SHELLENV_DUMP_PROTOCOL_INFO DumpInfo OPTIONAL, IN CHAR16 *IdString)

Internal interface to add protocol handlers.

This function is for internal shell use only. This is how protocol handlers are added. This will get the current protocol info and add the new info or update existing info and then resave the info.

Parameters
[in]ProtocolThe pointer to the protocol's GUID.
[in]DumpTokenThe function pointer to dump token function or NULL.
[in]DumpInfoThe function pointer to dump infomation function or NULL.
[in]IdStringThe English name of the protocol.

Definition at line 207 of file EfiShellEnvironment2.h.

◆ SHELLENV_BATCH_IS_ACTIVE

typedef BOOLEAN(EFIAPI * SHELLENV_BATCH_IS_ACTIVE) (VOID)

This function determines whether a script file is currently being processed.

A script file (.nsh file) can contain a series of commands and this is useful to know for some shell commands whether they are being run manually or as part of a script.

Return values
TRUEA script file is being processed.
FALSEA script file is not being processed.

Definition at line 326 of file EfiShellEnvironment2.h.

◆ SHELLENV_CLOSE_CONSOLE_PROXY

typedef VOID(EFIAPI * SHELLENV_CLOSE_CONSOLE_PROXY) (IN EFI_HANDLE ConInHandle, IN OUT EFI_SIMPLE_TEXT_INPUT_PROTOCOL **ConIn, IN EFI_HANDLE ConOutHandle, IN OUT EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL **ConOut)

Close the console proxy to restore the original console.

This is an internal shell function to handle shell cascading. It restores the original set of console protocols.

Parameters
[in]ConInHandleThe handle of ConIn.
[in,out]ConInThe pointer to the location to return the pointer to the original console input.
[in]ConOutHandleThe handle of ConOut
[in,out]ConOutThe pointer to the location to return the pointer to the original console output.

Definition at line 477 of file EfiShellEnvironment2.h.

◆ SHELLENV_CUR_DIR

typedef CHAR16 *(EFIAPI * SHELLENV_CUR_DIR) (IN CHAR16 *DeviceName OPTIONAL)

This function returns a string array containing the current directory on a given device.

If DeviceName is specified, then return the current shell directory on that device. If DeviceName is NULL, then return the current directory on the current device. The caller us responsible to free the returned string when no longer required.

Parameters
[in]DeviceNameThe name of the device to get the current directory on, or NULL for current device.
Returns
String array with the current directory on the current or specified device.

Definition at line 251 of file EfiShellEnvironment2.h.

◆ SHELLENV_DECREMENT_SHELL_NESTING_LEVEL

typedef VOID(EFIAPI * SHELLENV_DECREMENT_SHELL_NESTING_LEVEL) (VOID)

This is an internal shell function used to decrement the shell nesting level.

Definition at line 445 of file EfiShellEnvironment2.h.

◆ SHELLENV_DEL_DUP_FILE

typedef EFI_STATUS(EFIAPI * SHELLENV_DEL_DUP_FILE) (IN LIST_ENTRY *ListHead)

This function removes duplicate file listings from lists.

This is a function for use with SHELLENV_FILE_META_ARG_NO_WILDCARD and SHELLENV_FILE_META_ARG. This function will verify that there are no duplicate files in the list of returned files. Any file listed twice will have one of its instances removed.

Parameters
[in]ListHeadThe pointer to linked list head that was returned from SHELLENV_FILE_META_ARG_NO_WILDCARD or SHELLENV_FILE_META_ARG.
Return values
EFI_SUCCESSThis function always returns success.

Definition at line 878 of file EfiShellEnvironment2.h.

◆ SHELLENV_DISABLE_PAGE_BREAK

typedef VOID(EFIAPI * SHELLENV_DISABLE_PAGE_BREAK) (VOID)

This function disables the page break mode.

Disabling this causes the output to print out exactly as coded, with no breaks for readability.

Definition at line 366 of file EfiShellEnvironment2.h.

◆ SHELLENV_DUMP_PROTOCOL_INFO

typedef VOID(EFIAPI * SHELLENV_DUMP_PROTOCOL_INFO) (IN EFI_HANDLE Handle, IN VOID *Interface)

This function is a prototype for a function that dumps information on a protocol to a given location. The location is dependant on the implementation. This is used when programatically adding shell commands.

Parameters
[in]HandleThe handle the protocol is on.
[in]InterfaceThe interface to the protocol.

Definition at line 25 of file EfiShellEnvironment2.h.

◆ SHELLENV_ENABLE_PAGE_BREAK

typedef VOID(EFIAPI * SHELLENV_ENABLE_PAGE_BREAK) (IN INT32 StartRow, IN BOOLEAN AutoWrap)

This function enables the page break mode.

This mode causes the output to pause after each complete screen to enable a user to more easily read it. If AutoWrap is TRUE, then rows with too many characters will be chopped and divided into 2 rows. If FALSE, then rows with too many characters may not be fully visible to the user on the screen.

Parameters
[in]StartRowThe row number to start this on.
[in]AutoWrapWhether to auto wrap rows that are too long.

Definition at line 353 of file EfiShellEnvironment2.h.

◆ SHELLENV_EXECUTE

typedef EFI_STATUS(EFIAPI * SHELLENV_EXECUTE) (IN EFI_HANDLE *ParentImageHandle, IN CHAR16 *CommandLine, IN BOOLEAN DebugOutput)

Execute a command line.

This function will run the CommandLine. This includes loading any required images, parsing any requires scripts, and if DebugOutput is TRUE printing errors encountered directly to the screen.

Parameters
[in]ParentImageHandleHandle of the image executing this operation.
[in]CommandLineThe string command line to execute.
[in]DebugOutputTRUE indicates that errors should be printed directly. FALSE suppresses error messages.
Return values
EFI_SUCCESSThe command line executed and completed.
EFI_ABORTEDThe operation aborted.
EFI_INVALID_PARAMETERA parameter did not have a valid value.
EFI_OUT_OF_RESOURCESA required memory allocation failed.
See also
HandleProtocol

Definition at line 130 of file EfiShellEnvironment2.h.

◆ SHELLENV_FILE_META_ARG

typedef EFI_STATUS(EFIAPI * SHELLENV_FILE_META_ARG) (IN CHAR16 *Arg, IN OUT LIST_ENTRY *ListHead)

This function will open a group of files that match the Arg path, including support for wildcard characters ('?' and '*') in the Arg path. If there are any wildcard characters in the path this function will find any and all files that match the wildcards. It returns a double linked list based on the LIST_ENTRY linked list structure. Use this in conjunction with the SHELL_FILE_ARG_SIGNATURE to get the SHELL_FILE_ARG structures that are returned. The memory allocated by the callee for this list is freed by making a call to SHELLENV_FREE_FILE_LIST.

Parameters
[in]ArgThe pointer Path to files to open.
[in,out]ListHeadThe pointer to the allocated and initialized list head upon which to append all opened file structures.
Return values
EFI_SUCCESSOne or more files was opened and a struct of each file's information was appended to ListHead.
EFI_OUT_OF_RESOURCESA memory allocation failed.
EFI_NOT_FOUNDNo matching files could be found.
See also
SHELLENV_FREE_FILE_LIST

Definition at line 276 of file EfiShellEnvironment2.h.

◆ SHELLENV_FILE_META_ARG_NO_WILDCARD

typedef EFI_STATUS(EFIAPI * SHELLENV_FILE_META_ARG_NO_WILDCARD) (IN CHAR16 *Arg, IN OUT LIST_ENTRY *ListHead)

This function will open a group of files that match the Arg path, but will not support the wildcard characters ('?' and '*') in the Arg path. If there are any wildcard characters in the path this function will return EFI_INVALID_PARAMETER. The return is a double linked list based on the LIST_ENTRY linked list structure. Use this in conjunction with the SHELL_FILE_ARG_SIGNATURE to get the SHELL_FILE_ARG structures that are returned. The memory allocated by the callee for this list is freed by making a call to SHELLENV_FREE_FILE_LIST.

Parameters
[in]ArgThe pointer to the path of the files to be opened.
[in,out]ListHeadThe pointer to allocated and initialized list head upon which to append all the opened file structures.
Return values
EFI_SUCCESSOne or more files was opened and a struct of each file's information was appended to ListHead.
EFI_OUT_OF_RESOURCESA memory allocation failed.
EFI_NOT_FOUNDNo matching files could be found.
See also
SHELLENV_FREE_FILE_LIST

Definition at line 856 of file EfiShellEnvironment2.h.

◆ SHELLENV_FREE_FILE_LIST

typedef EFI_STATUS(EFIAPI * SHELLENV_FREE_FILE_LIST) (IN OUT LIST_ENTRY *ListHead)

This frees all of the nodes under the ListHead, but not ListHead itself.

Parameters
[in,out]ListHeadPointer to list to free all nodes of.
Return values
EFI_SUCCESSThis function always returns EFI_SUCCESS.

Definition at line 290 of file EfiShellEnvironment2.h.

◆ SHELLENV_FREE_RESOURCES

typedef VOID(EFIAPI * SHELLENV_FREE_RESOURCES) (VOID)

This is an internal shell function to free any and all allocated resources. This should be called immediately prior to closing the shell.

Definition at line 336 of file EfiShellEnvironment2.h.

◆ SHELLENV_GET_ENV

typedef CHAR16 *(EFIAPI * SHELLENV_GET_ENV) (IN CHAR16 *Name)

This function returns a shell environment variable value.

Parameters
[in]NameThe pointer to the string with the shell environment variable name.
Return values
NULLThe shell environment variable's value could not be found.
!=NULLThe value of the shell environment variable Name.

Definition at line 148 of file EfiShellEnvironment2.h.

◆ SHELLENV_GET_EXECUTION_BREAK

typedef BOOLEAN(EFIAPI * SHELLENV_GET_EXECUTION_BREAK) (VOID)

This function determines if the shell application should break.

This is used to inform a shell application that a break condition has been initiated. Long loops should check this to prevent delays to the break.

Return values
TRUEA break has been signaled. The application should exit with EFI_ABORTED as soon as possible.
FALSEContinue as normal.

Definition at line 426 of file EfiShellEnvironment2.h.

◆ SHELLENV_GET_FS_DEVICE_PATH

typedef EFI_STATUS(EFIAPI * SHELLENV_GET_FS_DEVICE_PATH) (IN CHAR16 *Name, OUT EFI_DEVICE_PATH_PROTOCOL **DevPath)

Converts a File System map name to a device path.

If DevPath is NULL, then ASSERT().

This function looks through the shell environment map for a map whose Name matches the Name parameter. If one is found, the device path pointer is updated to point to that file systems device path. The caller should not free the memory from that device path.

This function will use the internal lock to prevent changes to the map during the lookup operation.

Parameters
[in]NameThe pointer to the NULL terminated UNICODE string of the file system name.
[out]DevPathThe pointer to pointer to DevicePath. Only valid on successful return.
Return values
EFI_SUCCESSThe conversion was successful, and the device path was returned.
EFI_NOT_FOUNDThe file system could not be found in the map.

Definition at line 906 of file EfiShellEnvironment2.h.

◆ SHELLENV_GET_FS_NAME

typedef EFI_STATUS(EFIAPI * SHELLENV_GET_FS_NAME) (IN EFI_DEVICE_PATH_PROTOCOL *DevPath, IN BOOLEAN ConsistMapping, OUT CHAR16 **Name)

Converts a device path into a file system map name.

If DevPath is NULL, then ASSERT.

This function looks through the shell environment map for a map whose device path matches the DevPath parameter. If one is found the Name is returned via Name parameter. If successful the caller must free the memory allocated for Name.

This function will use the internal lock to prevent changes to the map during the lookup operation.

Parameters
[in]DevPathThe device path to search for a name for.
[in]ConsistMappingWhat state to verify map flag VAR_ID_CONSIST.
[out]NameOn successful return the name of that device path.
Return values
EFI_SUCCESSThe DevPath was found and the name returned in Name.
EFI_OUT_OF_RESOURCESA required memory allocation failed.
EFI_UNSUPPORTEDThe DevPath was not found in the map.

Definition at line 828 of file EfiShellEnvironment2.h.

◆ SHELLENV_GET_KEY_FILTER

typedef UINT32(EFIAPI * SHELLENV_GET_KEY_FILTER) (VOID)

This function gets the keys to filter for for the console in.

The valid values to get are: #define EFI_OUTPUT_SCROLL 0x00000001 #define EFI_OUTPUT_PAUSE 0x00000002 #define EFI_EXECUTION_BREAK 0x00000004

Return values
Thecurrent filter mask.

Definition at line 410 of file EfiShellEnvironment2.h.

◆ SHELLENV_GET_MAP

typedef CHAR16 *(EFIAPI * SHELLENV_GET_MAP) (IN CHAR16 *Name)

This function returns a shell environment map value.

Parameters
[in]NameThe pointer to the string with the shell environment map name.
Return values
NULLThe shell environment map's value could not be found.
!=NULLThe value of the shell environment map Name.

Definition at line 164 of file EfiShellEnvironment2.h.

◆ SHELLENV_GET_PAGE_BREAK

typedef BOOLEAN(EFIAPI * SHELLENV_GET_PAGE_BREAK) (VOID)

Get the status of the page break output mode.

Return values
FALSEPage break output mode is not enabled.
TRUEPage break output mode is enabled.

Definition at line 378 of file EfiShellEnvironment2.h.

◆ SHELLENV_GET_PROT

typedef CHAR16 *(EFIAPI * SHELLENV_GET_PROT) (IN EFI_GUID *Protocol, IN BOOLEAN GenId)

This function finds a protocol handle by a GUID.

This function will check for already known protocols by GUID and if one is found it will return the name of that protocol. If no name is found and GenId is TRUE it will generate ths string.

Parameters
[in]ProtocolThe GUID of the protocol to look for.
[in]GenIdWhether to generate a name string if it is not found.
Returns
!NULL The Name of the protocol.
Return values
NULLThe Name was not found, and GenId was not TRUE.

Definition at line 229 of file EfiShellEnvironment2.h.

◆ SHELLENV_INCREMENT_SHELL_NESTING_LEVEL

typedef VOID(EFIAPI * SHELLENV_INCREMENT_SHELL_NESTING_LEVEL) (VOID)

This is an internal shell function used to increment the shell nesting level.

Definition at line 436 of file EfiShellEnvironment2.h.

◆ SHELLENV_INTERNAL_COMMAND

typedef EFI_STATUS(EFIAPI * SHELLENV_INTERNAL_COMMAND) (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)

This function is a prototype for each command internal to the EFI shell implementation. The specific command depends on the implementation. This is used when programatically adding shell commands.

Parameters
[in]ImageHandleThe handle to the binary shell.
[in]SystemTableThe pointer to the system table.
Return values
EFI_SUCCESSThe command completed.
otherAn error occurred. Any error is possible depending on the implementation of the shell command.

Definition at line 46 of file EfiShellEnvironment2.h.

◆ SHELLENV_IS_ROOT_SHELL

typedef BOOLEAN(EFIAPI * SHELLENV_IS_ROOT_SHELL) (VOID)

This function determines if the caller is running under the root shell.

Return values
TRUEThe caller is running under the root shell.
FALSEThe caller is not running under the root shell.

Definition at line 458 of file EfiShellEnvironment2.h.

◆ SHELLENV_NAME_TO_PATH

typedef EFI_DEVICE_PATH_PROTOCOL *(EFIAPI * SHELLENV_NAME_TO_PATH) (IN CHAR16 *Path)

Convert a file system style name to a device path.

This function will convert a shell path name to a Device Path Protocol path. This function will allocate any required memory for this operation and it is the responsibility of the caller to free that memory when no longer required.

If anything prevents the complete conversion free any allocated memory and return NULL.

Parameters
[in]PathThe path to convert.
Return values
!NULLA pointer to the callee allocated Device Path.
NULLThe operation could not be completed.

Definition at line 800 of file EfiShellEnvironment2.h.

◆ SHELLENV_NEW_SHELL

typedef EFI_SHELL_INTERFACE *(EFIAPI * SHELLENV_NEW_SHELL) (IN EFI_HANDLE ImageHandle)

This function creates a new instance of the ShellInterface protocol for use on the ImageHandle.

This function is for internal shell usage. This will allocate and then populate EFI_SHELL_INTERFACE protocol. It is the caller's responsibility to free the memory.

Parameters
[in]ImageHandleThe handle which will use the new ShellInterface protocol.
Returns
The newly allocated shell interface protocol.

Definition at line 310 of file EfiShellEnvironment2.h.

◆ SHELLENV_SET_KEY_FILTER

typedef VOID(EFIAPI * SHELLENV_SET_KEY_FILTER) (IN UINT32 KeyFilter)

This function sets the keys to filter for for the console in. The valid values to set are:

#define EFI_OUTPUT_SCROLL 0x00000001 #define EFI_OUTPUT_PAUSE 0x00000002 #define EFI_EXECUTION_BREAK 0x00000004

Parameters
[in]KeyFilterThe new key filter to use.

Definition at line 394 of file EfiShellEnvironment2.h.

◆ SKIP_HANDLE

typedef EFI_STATUS(EFIAPI * SKIP_HANDLE) (IN UINTN SkipNum)

This is an internal shell function to enumerate the handle database.

This function skips the next SkipNum handles in the handle database. If there are not enough handles left to skip that many EFI_ACCESS_DENIED is returned and no skip is performed.

This must be called after INIT_HANDLE_ENUMERATOR and before CLOSE_HANDLE_ENUMERATOR.

Parameters
[in]SkipNumHow many handles to skip
Return values
EFI_SUCCESSThe next handle in the handle database is *Handle
EFI_ACCESS_DENIEDThere are not SkipNum handles left in the database

Definition at line 536 of file EfiShellEnvironment2.h.

◆ SKIP_PROTOCOL_INFO

typedef EFI_STATUS(EFIAPI * SKIP_PROTOCOL_INFO) (IN UINTN SkipNum)

This function is an internal shell function for enumeration of protocols.

This cannot be called after CLOSE_PROTOCOL_INFO_ENUMERATOR, but it must be called after INIT_PROTOCOL_INFO_ENUMERATOR.

This function does nothing and always returns EFI_SUCCESS.

Return values
EFI_SUCCESSAlways returned (see above).

Definition at line 675 of file EfiShellEnvironment2.h.