TianoCore EDK2 master
Loading...
Searching...
No Matches
Shell.c File Reference
#include "Shell.h"

Go to the source code of this file.

Functions

EFI_STATUS TrimSpaces (IN CHAR16 **String)
 
CHAR16 * FindNextInstance (IN CONST CHAR16 *SourceString, IN CONST CHAR16 *FindString, IN CONST BOOLEAN CheckForEscapeCharacter)
 
BOOLEAN IsValidEnvironmentVariableName (IN CONST CHAR16 *BeginPercent, IN CONST CHAR16 *EndPercent)
 
BOOLEAN ContainsSplit (IN CONST CHAR16 *CmdLine)
 
EFI_STATUS InternalEfiShellStartCtrlSMonitor (VOID)
 
EFI_STATUS EFIAPI UefiMain (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 
EFI_STATUS SetBuiltInAlias (VOID)
 
BOOLEAN IsCommand (IN CONST CHAR16 *Command1, IN CONST CHAR16 *Command2)
 
BOOLEAN IsScriptOnlyCommand (IN CONST CHAR16 *CommandName)
 
EFI_STATUS GetDevicePathsForImageAndFile (IN OUT EFI_DEVICE_PATH_PROTOCOL **DevPath, IN OUT EFI_DEVICE_PATH_PROTOCOL **FilePath)
 
EFI_STATUS ProcessCommandLine (VOID)
 
CHAR16 * LocateStartupScript (IN EFI_DEVICE_PATH_PROTOCOL *ImageDevicePath, IN EFI_DEVICE_PATH_PROTOCOL *FileDevicePath)
 
EFI_STATUS DoStartupScript (IN EFI_DEVICE_PATH_PROTOCOL *ImagePath, IN EFI_DEVICE_PATH_PROTOCOL *FilePath)
 
EFI_STATUS DoShellPrompt (VOID)
 
VOID * AddBufferToFreeList (VOID *Buffer)
 
VOID SaveBufferList (OUT LIST_ENTRY *OldBufferList)
 
VOID RestoreBufferList (IN OUT LIST_ENTRY *OldBufferList)
 
VOID AddLineToCommandHistory (IN CONST CHAR16 *Buffer)
 
EFI_STATUS ShellConvertAlias (IN OUT CHAR16 **CommandString)
 
EFI_STATUS StripUnreplacedEnvironmentVariables (IN OUT CHAR16 *CmdLine)
 
CHAR16 * ShellConvertVariables (IN CONST CHAR16 *OriginalCommandLine)
 
EFI_STATUS RunSplitCommand (IN CONST CHAR16 *CmdLine, IN SHELL_FILE_HANDLE StdIn, IN SHELL_FILE_HANDLE StdOut)
 
EFI_STATUS ShellSubstituteVariables (IN CHAR16 **CmdLine)
 
EFI_STATUS ShellSubstituteAliases (IN CHAR16 **CmdLine)
 
SHELL_OPERATION_TYPES GetOperationType (IN CONST CHAR16 *CmdName)
 
EFI_STATUS IsValidSplit (IN CONST CHAR16 *CmdLine)
 
EFI_STATUS VerifySplit (IN CONST CHAR16 *CmdLine)
 
EFI_STATUS ProcessNewSplitCommandLine (IN CONST CHAR16 *CmdLine)
 
EFI_STATUS ChangeMappedDrive (IN CONST CHAR16 *CmdLine)
 
EFI_STATUS DoHelpUpdate (IN OUT CHAR16 **CmdLine)
 
EFI_STATUS SetLastError (IN CONST SHELL_STATUS ErrorCode)
 
EFI_STATUS ProcessCommandLineToFinal (IN OUT CHAR16 **CmdLine)
 
EFI_STATUS RunInternalCommand (IN CONST CHAR16 *CmdLine, IN CHAR16 *FirstParameter, IN EFI_SHELL_PARAMETERS_PROTOCOL *ParamProtocol, OUT EFI_STATUS *CommandStatus)
 
EFI_STATUS RunCommandOrFile (IN SHELL_OPERATION_TYPES Type, IN CONST CHAR16 *CmdLine, IN CHAR16 *FirstParameter, IN EFI_SHELL_PARAMETERS_PROTOCOL *ParamProtocol, OUT EFI_STATUS *CommandStatus)
 
EFI_STATUS SetupAndRunCommandOrFile (IN SHELL_OPERATION_TYPES Type, IN CHAR16 *CmdLine, IN CHAR16 *FirstParameter, IN EFI_SHELL_PARAMETERS_PROTOCOL *ParamProtocol, OUT EFI_STATUS *CommandStatus)
 
EFI_STATUS RunShellCommand (IN CONST CHAR16 *CmdLine, OUT EFI_STATUS *CommandStatus)
 
EFI_STATUS RunCommand (IN CONST CHAR16 *CmdLine)
 
EFI_STATUS RunScriptFileHandle (IN SHELL_FILE_HANDLE Handle, IN CONST CHAR16 *Name)
 
EFI_STATUS RunScriptFile (IN CONST CHAR16 *ScriptPath, IN SHELL_FILE_HANDLE Handle OPTIONAL, IN CONST CHAR16 *CmdLine, IN EFI_SHELL_PARAMETERS_PROTOCOL *ParamProtocol)
 
CONST CHAR16 * FindFirstCharacter (IN CONST CHAR16 *String, IN CONST CHAR16 *CharacterList, IN CONST CHAR16 EscapeCharacter)
 

Variables

SHELL_INFO ShellInfoObject
 
STATIC CONST CHAR16 mScriptExtension [] = L".NSH"
 
STATIC CONST CHAR16 mExecutableExtensions [] = L".NSH;.EFI"
 
STATIC CONST CHAR16 mStartupScript [] = L"startup.nsh"
 
CONST CHAR16 mNoNestingEnvVarName [] = L"nonesting"
 
CONST CHAR16 mNoNestingTrue [] = L"True"
 
CONST CHAR16 mNoNestingFalse [] = L"False"
 

Detailed Description

This is THE shell (application)

Copyright (c) 2009 - 2019, Intel Corporation. All rights reserved.
(C) Copyright 2013-2014 Hewlett-Packard Development Company, L.P.
Copyright 2015-2018 Dell Technologies.
Copyright (C) 2023, Apple Inc. All rights reserved.

SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file Shell.c.

Function Documentation

◆ AddBufferToFreeList()

VOID * AddBufferToFreeList ( VOID *  Buffer)

Add a buffer to the Buffer To Free List for safely returning buffers to other places without risking letting them modify internal shell information.

Parameters
BufferSomething to pass to FreePool when the shell is exiting.

Definition at line 1480 of file Shell.c.

◆ AddLineToCommandHistory()

VOID AddLineToCommandHistory ( IN CONST CHAR16 *  Buffer)

Add a buffer to the Line History List

Parameters
BufferThe line buffer to add.

Definition at line 1534 of file Shell.c.

◆ ChangeMappedDrive()

EFI_STATUS ChangeMappedDrive ( IN CONST CHAR16 *  CmdLine)

Handle a request to change the current file system.

Parameters
[in]CmdLineThe passed in command line.
Return values
EFI_SUCCESSThe operation was successful.

Definition at line 2288 of file Shell.c.

◆ ContainsSplit()

BOOLEAN ContainsSplit ( IN CONST CHAR16 *  CmdLine)

Determine if a command line contains a split operation

Parameters
[in]CmdLineThe command line to parse.
Return values
TRUECmdLine has a valid split.
FALSECmdLine does not have a valid split.

Definition at line 212 of file Shell.c.

◆ DoHelpUpdate()

EFI_STATUS DoHelpUpdate ( IN OUT CHAR16 **  CmdLine)

Reprocess the command line to direct all -? to the help command.

if found, will add "help" as argv[0], and move the rest later.

Parameters
[in,out]CmdLinepointer to the command line to update

Definition at line 2324 of file Shell.c.

◆ DoShellPrompt()

EFI_STATUS DoShellPrompt ( VOID  )

Function to perform the shell prompt looping. It will do a single prompt, dispatch the result, and then return. It is expected that the caller will call this function in a loop many times.

Return values
EFI_SUCCESS
RETURN_ABORTED

Definition at line 1409 of file Shell.c.

◆ DoStartupScript()

EFI_STATUS DoStartupScript ( IN EFI_DEVICE_PATH_PROTOCOL ImagePath,
IN EFI_DEVICE_PATH_PROTOCOL FilePath 
)

Handles all interaction with the default startup script.

this will check that the correct command line parameters were passed, handle the delay, and then start running the script.

Parameters
ImagePaththe path to the image for shell. first place to look for the startup script
FilePaththe path to the file for shell. second place to look for the startup script.
Return values
EFI_SUCCESSthe variable is initialized.

Definition at line 1296 of file Shell.c.

◆ FindFirstCharacter()

CONST CHAR16 * FindFirstCharacter ( IN CONST CHAR16 *  String,
IN CONST CHAR16 *  CharacterList,
IN CONST CHAR16  EscapeCharacter 
)

Return the pointer to the first occurrence of any character from a list of characters.

Parameters
[in]Stringthe string to parse
[in]CharacterListthe list of character to look for
[in]EscapeCharacterAn escape character to skip
Returns
the location of the first character in the string
Return values
CHAR_NULLno instance of any character in CharacterList was found in String

Definition at line 3337 of file Shell.c.

◆ FindNextInstance()

CHAR16 * FindNextInstance ( IN CONST CHAR16 *  SourceString,
IN CONST CHAR16 *  FindString,
IN CONST BOOLEAN  CheckForEscapeCharacter 
)

Parse for the next instance of one string within another string. Can optionally make sure that the string was not escaped (^ character) per the shell specification.

Parameters
[in]SourceStringThe string to search within
[in]FindStringThe string to look for
[in]CheckForEscapeCharacterTRUE to skip escaped instances of FinfString, otherwise will return even escaped instances

Definition at line 121 of file Shell.c.

◆ GetDevicePathsForImageAndFile()

EFI_STATUS GetDevicePathsForImageAndFile ( IN OUT EFI_DEVICE_PATH_PROTOCOL **  DevPath,
IN OUT EFI_DEVICE_PATH_PROTOCOL **  FilePath 
)

This function will populate the 2 device path protocol parameters based on the global gImageHandle. The DevPath will point to the device path for the handle that has loaded image protocol installed on it. The FilePath will point to the device path for the file that was loaded.

Parameters
[in,out]DevPathOn a successful return the device path to the loaded image.
[in,out]FilePathOn a successful return the device path to the file.
Return values
EFI_SUCCESSThe 2 device paths were successfully returned.
otherA error from gBS->HandleProtocol.
See also
HandleProtocol

Definition at line 876 of file Shell.c.

◆ GetOperationType()

SHELL_OPERATION_TYPES GetOperationType ( IN CONST CHAR16 *  CmdName)

Takes the Argv[0] part of the command line and determine the meaning of it.

Parameters
[in]CmdNamepointer to the command line to update.
Return values
Internal_CommandThe name is an internal command.
File_Sys_Changethe name is a file system change.
Script_File_Namethe name is a NSH script file.
Unknown_Invalidthe name is unknown.
Efi_Applicationthe name is an application (.EFI).

Definition at line 2071 of file Shell.c.

◆ InternalEfiShellStartCtrlSMonitor()

EFI_STATUS InternalEfiShellStartCtrlSMonitor ( VOID  )

Function to start monitoring for CTRL-S using SimpleTextInputEx. This feature's enabled state was not known when the shell initially launched.

Return values
EFI_SUCCESSThe feature is enabled.
EFI_OUT_OF_RESOURCESThere is not enough memory available.

Definition at line 264 of file Shell.c.

◆ IsCommand()

BOOLEAN IsCommand ( IN CONST CHAR16 *  Command1,
IN CONST CHAR16 *  Command2 
)

Internal function to determine if 2 command names are really the same.

Parameters
[in]Command1The pointer to the first command name.
[in]Command2The pointer to the second command name.
Return values
TRUEThe 2 command names are the same.
FALSEThe 2 command names are not the same.

Definition at line 823 of file Shell.c.

◆ IsScriptOnlyCommand()

BOOLEAN IsScriptOnlyCommand ( IN CONST CHAR16 *  CommandName)

Internal function to determine if a command is a script only command.

Parameters
[in]CommandNameThe pointer to the command name.
Return values
TRUEThe command is a script only command.
FALSEThe command is not a script only command.

Definition at line 844 of file Shell.c.

◆ IsValidEnvironmentVariableName()

BOOLEAN IsValidEnvironmentVariableName ( IN CONST CHAR16 *  BeginPercent,
IN CONST CHAR16 *  EndPercent 
)

Check whether the string between a pair of % is a valid environment variable name.

Parameters
[in]BeginPercentpointer to the first percent.
[in]EndPercentpointer to the last percent.
Return values
TRUEis a valid environment variable name.
FALSEis NOT a valid environment variable name.

Definition at line 165 of file Shell.c.

◆ IsValidSplit()

EFI_STATUS IsValidSplit ( IN CONST CHAR16 *  CmdLine)

Determine if the first item in a command line is valid.

Parameters
[in]CmdLineThe command line to parse.
Return values
EFI_SUCCESSThe item is valid.
EFI_OUT_OF_RESOURCESA memory allocation failed.
EFI_NOT_FOUNDThe operation type is unknown or invalid.

Definition at line 2141 of file Shell.c.

◆ LocateStartupScript()

CHAR16 * LocateStartupScript ( IN EFI_DEVICE_PATH_PROTOCOL ImageDevicePath,
IN EFI_DEVICE_PATH_PROTOCOL FileDevicePath 
)

Function try to find location of the Startup.nsh file.

The buffer is callee allocated and should be freed by the caller.

Parameters
ImageDevicePathThe path to the image for shell. first place to look for the startup script
FileDevicePathThe path to the file for shell. second place to look for the startup script.
Return values
NULLNo Startup.nsh file was found.
Returns
!=NULL Pointer to NULL-terminated path.

Definition at line 1236 of file Shell.c.

◆ ProcessCommandLine()

EFI_STATUS ProcessCommandLine ( VOID  )

Process all Uefi Shell 2.0 command line options.

see Uefi Shell 2.0 section 3.2 for full details.

the command line must resemble the following:

shell.efi [ShellOpt-options] [options] [file-name [file-name-options]]

ShellOpt-options Options which control the initialization behavior of the shell. These options are read from the EFI global variable "ShellOpt" and are processed before options or file-name.

options Options which control the initialization behavior of the shell.

file-name The name of a UEFI shell application or script to be executed after initialization is complete. By default, if file-name is specified, then -nostartup is implied. Scripts are not supported by level 0.

file-name-options The command-line options that are passed to file-name when it is invoked.

This will initialize the ShellInfoObject.ShellInitSettings global variable.

Return values
EFI_SUCCESSThe variable is initialized.

Definition at line 955 of file Shell.c.

◆ ProcessCommandLineToFinal()

EFI_STATUS ProcessCommandLineToFinal ( IN OUT CHAR16 **  CmdLine)

Converts the command line to its post-processed form. this replaces variables and alias' per UEFI Shell spec.

Parameters
[in,out]CmdLinepointer to the command line to update
Return values
EFI_SUCCESSThe operation was successful
EFI_OUT_OF_RESOURCESA memory allocation failed.
Returns
some other error occurred

Definition at line 2407 of file Shell.c.

◆ ProcessNewSplitCommandLine()

EFI_STATUS ProcessNewSplitCommandLine ( IN CONST CHAR16 *  CmdLine)

Process a split based operation.

Parameters
[in]CmdLinepointer to the command line to process
Return values
EFI_SUCCESSThe operation was successful
Returns
an error occurred.

Definition at line 2246 of file Shell.c.

◆ RestoreBufferList()

VOID RestoreBufferList ( IN OUT LIST_ENTRY OldBufferList)

Restore previous nodes into BufferToFreeList .

Parameters
OldBufferListThe temporary list head used to store the nodes in BufferToFreeList.

Definition at line 1520 of file Shell.c.

◆ RunCommand()

EFI_STATUS RunCommand ( IN CONST CHAR16 *  CmdLine)

Function will process and run a command line.

This will determine if the command line represents an internal shell command or dispatch an external application.

Parameters
[in]CmdLineThe command line to parse.
Return values
EFI_SUCCESSThe command was completed.
EFI_ABORTEDThe command's operation was aborted.

Definition at line 2918 of file Shell.c.

◆ RunCommandOrFile()

EFI_STATUS RunCommandOrFile ( IN SHELL_OPERATION_TYPES  Type,
IN CONST CHAR16 *  CmdLine,
IN CHAR16 *  FirstParameter,
IN EFI_SHELL_PARAMETERS_PROTOCOL ParamProtocol,
OUT EFI_STATUS CommandStatus 
)

Function to run the command or file.

Parameters
[in]Typethe type of operation being run.
[in]CmdLinethe command line to run.
[in]FirstParameterthe first parameter on the command line
[in]ParamProtocolthe shell parameters protocol pointer
[out]CommandStatusthe status from the command line.
Return values
EFI_SUCCESSThe command was completed.
EFI_ABORTEDThe command's operation was aborted.

Definition at line 2574 of file Shell.c.

◆ RunInternalCommand()

EFI_STATUS RunInternalCommand ( IN CONST CHAR16 *  CmdLine,
IN CHAR16 *  FirstParameter,
IN EFI_SHELL_PARAMETERS_PROTOCOL ParamProtocol,
OUT EFI_STATUS CommandStatus 
)

Run an internal shell command.

This API will update the shell's environment since these commands are libraries.

Parameters
[in]CmdLinethe command line to run.
[in]FirstParameterthe first parameter on the command line
[in]ParamProtocolthe shell parameters protocol pointer
[out]CommandStatusthe status from the command line.
Return values
EFI_SUCCESSThe command was completed.
EFI_ABORTEDThe command's operation was aborted.

Definition at line 2461 of file Shell.c.

◆ RunScriptFile()

EFI_STATUS RunScriptFile ( IN CONST CHAR16 *  ScriptPath,
IN SHELL_FILE_HANDLE Handle  OPTIONAL,
IN CONST CHAR16 *  CmdLine,
IN EFI_SHELL_PARAMETERS_PROTOCOL ParamProtocol 
)

Function to process a NSH script file.

Parameters
[in]ScriptPathPointer to the script file name (including file system path).
[in]Handlethe handle of the script file already opened.
[in]CmdLinethe command line to run.
[in]ParamProtocolthe shell parameters protocol pointer
Return values
EFI_SUCCESSthe script completed successfully

Definition at line 3275 of file Shell.c.

◆ RunScriptFileHandle()

EFI_STATUS RunScriptFileHandle ( IN SHELL_FILE_HANDLE  Handle,
IN CONST CHAR16 *  Name 
)

Function to process a NSH script file via SHELL_FILE_HANDLE.

Parameters
[in]HandleThe handle to the already opened file.
[in]NameThe name of the script file.
Return values
EFI_SUCCESSthe script completed successfully

Definition at line 2934 of file Shell.c.

◆ RunShellCommand()

EFI_STATUS RunShellCommand ( IN CONST CHAR16 *  CmdLine,
OUT EFI_STATUS CommandStatus 
)

Function will process and run a command line.

This will determine if the command line represents an internal shell command or dispatch an external application.

Parameters
[in]CmdLineThe command line to parse.
[out]CommandStatusThe status from the command line.
Return values
EFI_SUCCESSThe command was completed.
EFI_ABORTEDThe command's operation was aborted.

Definition at line 2780 of file Shell.c.

◆ RunSplitCommand()

EFI_STATUS RunSplitCommand ( IN CONST CHAR16 *  CmdLine,
IN SHELL_FILE_HANDLE  StdIn,
IN SHELL_FILE_HANDLE  StdOut 
)

Internal function to run a command line with pipe usage.

Parameters
[in]CmdLineThe pointer to the command line.
[in]StdInThe pointer to the Standard input.
[in]StdOutThe pointer to the Standard output.
Return values
EFI_SUCCESSThe split command is executed successfully.
otherSome error occurs when executing the split command.

Definition at line 1850 of file Shell.c.

◆ SaveBufferList()

VOID SaveBufferList ( OUT LIST_ENTRY OldBufferList)

Create a new buffer list and stores the old one to OldBufferList

Parameters
OldBufferListThe temporary list head used to store the nodes in BufferToFreeList.

Definition at line 1506 of file Shell.c.

◆ SetBuiltInAlias()

EFI_STATUS SetBuiltInAlias ( VOID  )

Sets all the alias' that were registered with the ShellCommandLib library.

Return values
EFI_SUCCESSall init commands were run successfully.

Definition at line 782 of file Shell.c.

◆ SetLastError()

EFI_STATUS SetLastError ( IN CONST SHELL_STATUS  ErrorCode)

Function to update the shell variable "lasterror".

Parameters
[in]ErrorCodethe error code to put into lasterror.

Definition at line 2377 of file Shell.c.

◆ SetupAndRunCommandOrFile()

EFI_STATUS SetupAndRunCommandOrFile ( IN SHELL_OPERATION_TYPES  Type,
IN CHAR16 *  CmdLine,
IN CHAR16 *  FirstParameter,
IN EFI_SHELL_PARAMETERS_PROTOCOL ParamProtocol,
OUT EFI_STATUS CommandStatus 
)

Function to setup StdIn, StdErr, StdOut, and then run the command or file.

Parameters
[in]Typethe type of operation being run.
[in]CmdLinethe command line to run.
[in]FirstParameterthe first parameter on the command line.
[in]ParamProtocolthe shell parameters protocol pointer
[out]CommandStatusthe status from the command line.
Return values
EFI_SUCCESSThe command was completed.
EFI_ABORTEDThe command's operation was aborted.

Definition at line 2718 of file Shell.c.

◆ ShellConvertAlias()

EFI_STATUS ShellConvertAlias ( IN OUT CHAR16 **  CommandString)

Checks if a string is an alias for another command. If yes, then it replaces the alias name with the correct command name.

Parameters
[in,out]CommandStringUpon entry the potential alias. Upon return the command name if it was an alias. If it was not an alias it will be unchanged. This function may change the buffer to fit the command name.
Return values
EFI_SUCCESSThe name was changed.
EFI_SUCCESSThe name was not an alias.
EFI_OUT_OF_RESOURCESA memory allocation failed.

Definition at line 1597 of file Shell.c.

◆ ShellConvertVariables()

CHAR16 * ShellConvertVariables ( IN CONST CHAR16 *  OriginalCommandLine)

Function allocates a new command line and replaces all instances of environment variable names that are correctly preset to their values.

If the return value is not NULL the memory must be caller freed.

Parameters
[in]OriginalCommandLineThe original command line
Return values
NULLAn error occurred.
Returns
The new command line with no environment variables present.
Todo:
update this to handle the %0 - %9 for scripting only (borrow from line 1256 area) ? ? ?

Definition at line 1700 of file Shell.c.

◆ ShellSubstituteAliases()

EFI_STATUS ShellSubstituteAliases ( IN CHAR16 **  CmdLine)

Take the original command line, substitute any alias in the first group of space delimited characters, free the original string, return the modified copy.

Parameters
[in]CmdLinepointer to the command line to update.
Return values
EFI_SUCCESSthe function was successful.
EFI_OUT_OF_RESOURCESa memory allocation failed.

Definition at line 1998 of file Shell.c.

◆ ShellSubstituteVariables()

EFI_STATUS ShellSubstituteVariables ( IN CHAR16 **  CmdLine)

Take the original command line, substitute any variables, free the original string, return the modified copy.

Parameters
[in]CmdLinepointer to the command line to update.
Return values
EFI_SUCCESSthe function was successful.
EFI_OUT_OF_RESOURCESa memory allocation failed.

Definition at line 1972 of file Shell.c.

◆ StripUnreplacedEnvironmentVariables()

EFI_STATUS StripUnreplacedEnvironmentVariables ( IN OUT CHAR16 *  CmdLine)

This function will eliminate unreplaced (and therefore non-found) environment variables.

Parameters
[in,out]CmdLineThe command line to update.

Definition at line 1623 of file Shell.c.

◆ TrimSpaces()

EFI_STATUS TrimSpaces ( IN CHAR16 **  String)

Cleans off leading and trailing spaces and tabs.

Parameters
[in]Stringpointer to the string to trim them off.

Definition at line 89 of file Shell.c.

◆ UefiMain()

EFI_STATUS EFIAPI UefiMain ( IN EFI_HANDLE  ImageHandle,
IN EFI_SYSTEM_TABLE SystemTable 
)

The entry point for the application.

Parameters
[in]ImageHandleThe firmware allocated handle for the EFI image.
[in]SystemTableA pointer to the EFI System Table.
Return values
EFI_SUCCESSThe entry point is executed successfully.
otherSome error occurs when executing this entry point.
Todo:
add support for Framework HII
Todo:
Add our package into Framework HII
Todo:
finish this de-allocation (free SplitStdIn/Out when needed).

Definition at line 350 of file Shell.c.

◆ VerifySplit()

EFI_STATUS VerifySplit ( IN CONST CHAR16 *  CmdLine)

Determine if a command line contains with a split contains only valid commands.

Parameters
[in]CmdLineThe command line to parse.
Return values
EFI_SUCCESSCmdLine has only valid commands, application, or has no split.
EFI_ABORTEDCmdLine has at least one invalid command or application.

Definition at line 2200 of file Shell.c.

Variable Documentation

◆ mExecutableExtensions

STATIC CONST CHAR16 mExecutableExtensions[] = L".NSH;.EFI"

Definition at line 77 of file Shell.c.

◆ mNoNestingEnvVarName

CONST CHAR16 mNoNestingEnvVarName[] = L"nonesting"

Definition at line 79 of file Shell.c.

◆ mNoNestingFalse

CONST CHAR16 mNoNestingFalse[] = L"False"

Definition at line 81 of file Shell.c.

◆ mNoNestingTrue

CONST CHAR16 mNoNestingTrue[] = L"True"

Definition at line 80 of file Shell.c.

◆ mScriptExtension

STATIC CONST CHAR16 mScriptExtension[] = L".NSH"

Definition at line 76 of file Shell.c.

◆ mStartupScript

STATIC CONST CHAR16 mStartupScript[] = L"startup.nsh"

Definition at line 78 of file Shell.c.

◆ ShellInfoObject

SHELL_INFO ShellInfoObject

Definition at line 17 of file Shell.c.