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

Go to the source code of this file.

Functions

CONST CHAR16 *EFIAPI ShellCommandGetManFileNameLevel2 (VOID)
 
EFI_STATUS EFIAPI ShellLevel2CommandsLibConstructor (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 
EFI_STATUS EFIAPI ShellLevel2CommandsLibDestructor (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)
 

Variables

CONST CHAR16 mFileName [] = L"ShellCommands"
 
EFI_HII_HANDLE gShellLevel2HiiHandle = NULL
 

Detailed Description

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

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

functions are non-interactive only

Copyright (c) 2014 Hewlett-Packard Development Company, L.P. Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file UefiShellLevel2CommandsLib.c.

Function Documentation

◆ 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.
otherAn allocated pointer to a fully qualified path.

Definition at line 167 of file UefiShellLevel2CommandsLib.c.

◆ ShellCommandGetManFileNameLevel2()

CONST CHAR16 *EFIAPI ShellCommandGetManFileNameLevel2 ( VOID  )

Get the filename to get help text from if not using HII.

Return values
Thefilename.

Definition at line 41 of file UefiShellLevel2CommandsLib.c.

◆ ShellLevel2CommandsLibConstructor()

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

Constructor for the Shell Level 2 Commands library.

Install the handlers for level 2 UEFI Shell 2.0 commands.

Parameters
ImageHandlethe image handle of the process
SystemTablethe EFI System Table pointer
Return values
EFI_SUCCESSthe shell command handlers were installed successfully
EFI_UNSUPPORTEDthe shell level required was not found.

Definition at line 61 of file UefiShellLevel2CommandsLib.c.

◆ ShellLevel2CommandsLibDestructor()

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

Destructor for the library. free any resources.

Parameters
ImageHandleThe image handle of the process.
SystemTableThe EFI System Table pointer.
Return values
EFI_SUCCESSAlways returned.

Definition at line 138 of file UefiShellLevel2CommandsLib.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 = NULL

Definition at line 32 of file UefiShellLevel2CommandsLib.c.

◆ mFileName

CONST CHAR16 mFileName[] = L"ShellCommands"

Definition at line 31 of file UefiShellLevel2CommandsLib.c.