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

Go to the source code of this file.

Functions

SHELL_STATUS EFIAPI ShellCommandRunAttrib (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 
SHELL_STATUS EFIAPI ShellCommandRunDate (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 
SHELL_STATUS EFIAPI ShellCommandRunTime (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 
SHELL_STATUS EFIAPI ShellCommandRunLoad (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 
SHELL_STATUS EFIAPI ShellCommandRunLs (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 
SHELL_STATUS EFIAPI ShellCommandRunMap (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 
SHELL_STATUS EFIAPI ShellCommandRunReset (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 
SHELL_STATUS EFIAPI ShellCommandRunTimeZone (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 
SHELL_STATUS EFIAPI ShellCommandRunSet (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 
SHELL_STATUS EFIAPI ShellCommandRunMkDir (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 
SHELL_STATUS EFIAPI ShellCommandRunCd (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 
SHELL_STATUS EFIAPI ShellCommandRunCp (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 
SHELL_STATUS EFIAPI ShellCommandRunParse (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 
SHELL_STATUS EFIAPI ShellCommandRunRm (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 
SHELL_STATUS EFIAPI ShellCommandRunMv (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 
CHAR16 * GetFullyQualifiedPath (IN CONST CHAR16 *Path)
 
EFI_STATUS VerifyIntermediateDirectories (IN CONST CHAR16 *Path)
 
INTN StrniCmp (IN CONST CHAR16 *Source, IN CONST CHAR16 *Target, IN CONST UINTN Count)
 
EFI_STATUS ShellLevel2StripQuotes (IN CONST CHAR16 *OriginalString, OUT CHAR16 **CleanString)
 
SHELL_STATUS EFIAPI ShellCommandRunVol (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 
SHELL_STATUS CopySingleFile (IN CONST CHAR16 *Source, IN CONST CHAR16 *Dest, OUT VOID **Resp, IN BOOLEAN SilentMode, IN CONST CHAR16 *CmdName)
 
SHELL_STATUS CascadeDelete (IN EFI_SHELL_FILE_INFO *Node, IN CONST BOOLEAN Quiet)
 

Variables

CONST CHAR16 mFileName []
 
EFI_HII_HANDLE gShellLevel2HiiHandle
 

Detailed Description

Main file for NULL named library for level 2 shell command functions.

these functions are: attrib, cd, cp, date*, time*, rm, reset, load, ls, map, mkdir, mv, parse, set, timezone*

functions are non-interactive only

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

Definition in file UefiShellLevel2CommandsLib.h.

Function Documentation

◆ CascadeDelete()

SHELL_STATUS CascadeDelete ( IN EFI_SHELL_FILE_INFO Node,
IN CONST BOOLEAN  Quiet 
)

Delete a node and all nodes under it (including sub directories).

Parameters
[in]NodeThe node to start deleting with.
[in]QuietTRUE to print no messages.
Return values
SHELL_SUCCESSThe operation was successful.
SHELL_ACCESS_DENIEDA file was read only.
SHELL_ABORTEDThe abort message was received.
SHELL_DEVICE_ERRORA device error occurred reading this Node.

Definition at line 66 of file Rm.c.

◆ CopySingleFile()

SHELL_STATUS CopySingleFile ( IN CONST CHAR16 *  Source,
IN CONST CHAR16 *  Dest,
OUT VOID **  Resp,
IN BOOLEAN  SilentMode,
IN CONST CHAR16 *  CmdName 
)

Function to Copy one file to another location

If the destination exists the user will be prompted and the result put into *resp

Parameters
[in]Sourcepointer to source file name
[in]Destpointer to destination file name
[out]Resppointer to response from question. Pass back on looped calling
[in]SilentModewhether to run in quiet mode or not
[in]CmdNameSource command name requesting single file copy
Return values
SHELL_SUCCESSThe source file was copied to the destination

Definition at line 54 of file Cp.c.

◆ GetFullyQualifiedPath()

CHAR16 * GetFullyQualifiedPath ( IN CONST CHAR16 *  Path)

returns a fully qualified directory (contains a map drive at the beginning) path from a unknown directory path.

If Path is already fully qualified this will return a duplicate otherwise this will use get the current directory and use that to build the fully qualified version.

if the return value is not NULL it must be caller freed.

Parameters
[in]PathThe unknown Path Value
Return values
NULLA memory allocation failed
NULLa fully qualified path could not be discovered.
otherpointer to a fully qualified path.

returns a fully qualified directory (contains a map drive at the beginning) path from a unknown directory path.

If Path is already fully qualified this will return a duplicate otherwise this will use get the current directory and use that to build the fully qualified version.

if the return value is not NULL it must be caller freed.

Parameters
[in]PathThe unknown Path Value
Return values
NULLA memory allocation failed
NULLA fully qualified path could not be discovered.
otherAn allocated pointer to a fully qualified path.

Definition at line 167 of file UefiShellLevel2CommandsLib.c.

◆ ShellCommandRunAttrib()

SHELL_STATUS EFIAPI ShellCommandRunAttrib ( IN EFI_HANDLE  ImageHandle,
IN EFI_SYSTEM_TABLE SystemTable 
)

Function for 'attrib' command.

Parameters
[in]ImageHandleHandle to the Image (NULL if Internal).
[in]SystemTablePointer to the System Table (NULL if Internal).

Definition at line 34 of file Attrib.c.

◆ ShellCommandRunCd()

SHELL_STATUS EFIAPI ShellCommandRunCd ( IN EFI_HANDLE  ImageHandle,
IN EFI_SYSTEM_TABLE SystemTable 
)

Function for 'cd' command.

Parameters
[in]ImageHandleHandle to the Image (NULL if Internal).
[in]SystemTablePointer to the System Table (NULL if Internal).

Definition at line 173 of file Cd.c.

◆ ShellCommandRunCp()

SHELL_STATUS EFIAPI ShellCommandRunCp ( IN EFI_HANDLE  ImageHandle,
IN EFI_SYSTEM_TABLE SystemTable 
)

Function for 'cp' command.

Parameters
[in]ImageHandleHandle to the Image (NULL if Internal).
[in]SystemTablePointer to the System Table (NULL if Internal).

Definition at line 658 of file Cp.c.

◆ ShellCommandRunDate()

SHELL_STATUS EFIAPI ShellCommandRunDate ( IN EFI_HANDLE  ImageHandle,
IN EFI_SYSTEM_TABLE SystemTable 
)

Function for 'date' command.

Parameters
[in]ImageHandleHandle to the Image (NULL if Internal).
[in]SystemTablePointer to the System Table (NULL if Internal).

Definition at line 177 of file TimeDate.c.

◆ ShellCommandRunLoad()

SHELL_STATUS EFIAPI ShellCommandRunLoad ( IN EFI_HANDLE  ImageHandle,
IN EFI_SYSTEM_TABLE SystemTable 
)

Function for 'load' command.

Parameters
[in]ImageHandleHandle to the Image (NULL if Internal).
[in]SystemTablePointer to the System Table (NULL if Internal).

Definition at line 193 of file Load.c.

◆ ShellCommandRunLs()

SHELL_STATUS EFIAPI ShellCommandRunLs ( IN EFI_HANDLE  ImageHandle,
IN EFI_SYSTEM_TABLE SystemTable 
)

Function for 'ls' command.

Parameters
[in]ImageHandleHandle to the Image (NULL if Internal).
[in]SystemTablePointer to the System Table (NULL if Internal).

Definition at line 722 of file Ls.c.

◆ ShellCommandRunMap()

SHELL_STATUS EFIAPI ShellCommandRunMap ( IN EFI_HANDLE  ImageHandle,
IN EFI_SYSTEM_TABLE SystemTable 
)

Function for 'map' command.

Parameters
[in]ImageHandleHandle to the Image (NULL if Internal).
[in]SystemTablePointer to the System Table (NULL if Internal).

Definition at line 1113 of file Map.c.

◆ ShellCommandRunMkDir()

SHELL_STATUS EFIAPI ShellCommandRunMkDir ( IN EFI_HANDLE  ImageHandle,
IN EFI_SYSTEM_TABLE SystemTable 
)

Function for 'mkdir' command.

Parameters
[in]ImageHandleHandle to the Image (NULL if Internal).
[in]SystemTablePointer to the System Table (NULL if Internal).

Definition at line 20 of file MkDir.c.

◆ ShellCommandRunMv()

SHELL_STATUS EFIAPI ShellCommandRunMv ( IN EFI_HANDLE  ImageHandle,
IN EFI_SYSTEM_TABLE SystemTable 
)

Function for 'mv' command.

Parameters
[in]ImageHandleHandle to the Image (NULL if Internal).
[in]SystemTablePointer to the System Table (NULL if Internal).
Todo:
make sure this works with error half way through and continues...

Definition at line 751 of file Mv.c.

◆ ShellCommandRunParse()

SHELL_STATUS EFIAPI ShellCommandRunParse ( IN EFI_HANDLE  ImageHandle,
IN EFI_SYSTEM_TABLE SystemTable 
)

Function for 'parse' command.

Parameters
[in]ImageHandleHandle to the Image (NULL if Internal).
[in]SystemTablePointer to the System Table (NULL if Internal).

Definition at line 245 of file Parse.c.

◆ ShellCommandRunReset()

SHELL_STATUS EFIAPI ShellCommandRunReset ( IN EFI_HANDLE  ImageHandle,
IN EFI_SYSTEM_TABLE SystemTable 
)

Function for 'reset' command.

Parameters
[in]ImageHandleHandle to the Image (NULL if Internal).
[in]SystemTablePointer to the System Table (NULL if Internal).

Definition at line 28 of file Reset.c.

◆ ShellCommandRunRm()

SHELL_STATUS EFIAPI ShellCommandRunRm ( IN EFI_HANDLE  ImageHandle,
IN EFI_SYSTEM_TABLE SystemTable 
)

Function for 'rm' command.

Parameters
[in]ImageHandleHandle to the Image (NULL if Internal).
[in]SystemTablePointer to the System Table (NULL if Internal).

Definition at line 279 of file Rm.c.

◆ ShellCommandRunSet()

SHELL_STATUS EFIAPI ShellCommandRunSet ( IN EFI_HANDLE  ImageHandle,
IN EFI_SYSTEM_TABLE SystemTable 
)

Function for 'set' command.

Parameters
[in]ImageHandleHandle to the Image (NULL if Internal).
[in]SystemTablePointer to the System Table (NULL if Internal).

Definition at line 56 of file Set.c.

◆ ShellCommandRunTime()

SHELL_STATUS EFIAPI ShellCommandRunTime ( IN EFI_HANDLE  ImageHandle,
IN EFI_SYSTEM_TABLE SystemTable 
)

Function for 'time' command.

Parameters
[in]ImageHandleHandle to the Image (NULL if Internal).
[in]SystemTablePointer to the System Table (NULL if Internal).

Definition at line 409 of file TimeDate.c.

◆ ShellCommandRunTimeZone()

SHELL_STATUS EFIAPI ShellCommandRunTimeZone ( IN EFI_HANDLE  ImageHandle,
IN EFI_SYSTEM_TABLE SystemTable 
)

Function for 'timezone' command.

Parameters
[in]ImageHandleHandle to the Image (NULL if Internal).
[in]SystemTablePointer to the System Table (NULL if Internal).

Definition at line 821 of file TimeDate.c.

◆ ShellCommandRunVol()

SHELL_STATUS EFIAPI ShellCommandRunVol ( IN EFI_HANDLE  ImageHandle,
IN EFI_SYSTEM_TABLE SystemTable 
)

Function for 'Vol' command.

Parameters
[in]ImageHandleHandle to the Image (NULL if Internal).
[in]SystemTablePointer to the System Table (NULL if Internal).

Definition at line 215 of file Vol.c.

◆ ShellLevel2StripQuotes()

EFI_STATUS ShellLevel2StripQuotes ( IN CONST CHAR16 *  OriginalString,
OUT CHAR16 **  CleanString 
)

Cleans off all the quotes in the string.

Parameters
[in]OriginalStringpointer to the string to be cleaned.
[out]CleanStringThe new string with all quotes removed. Memory allocated in the function and free by caller.
Return values
EFI_SUCCESSThe operation was successful.

Definition at line 322 of file UefiShellLevel2CommandsLib.c.

◆ StrniCmp()

INTN StrniCmp ( IN CONST CHAR16 *  Source,
IN CONST CHAR16 *  Target,
IN CONST UINTN  Count 
)

String comparison without regard to case for a limited number of characters.

Parameters
[in]SourceThe first item to compare.
[in]TargetThe second item to compare.
[in]CountHow many characters to compare.
Return values
0Source and Target are identical strings without regard to case.
!=0Source is not identical to Target.

Definition at line 272 of file UefiShellLevel2CommandsLib.c.

◆ VerifyIntermediateDirectories()

EFI_STATUS VerifyIntermediateDirectories ( IN CONST CHAR16 *  Path)

Function to verify all intermediate directories in the path.

Parameters
[in]PathThe pointer to the path to fix.
Return values
EFI_SUCCESSThe operation was successful.

Definition at line 214 of file UefiShellLevel2CommandsLib.c.

Variable Documentation

◆ gShellLevel2HiiHandle

EFI_HII_HANDLE gShellLevel2HiiHandle
extern

Definition at line 32 of file UefiShellLevel2CommandsLib.c.

◆ mFileName

CONST CHAR16 mFileName[]
extern

Definition at line 39 of file UefiShellBcfgCommandLib.c.