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

Go to the source code of this file.

Functions

CONST CHAR16 *EFIAPI ShellCommandGetManFileNameDebug1 (VOID)
 
EFI_STATUS EFIAPI UefiShellDebug1CommandsLibConstructor (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 
EFI_STATUS EFIAPI UefiShellDebug1CommandsLibDestructor (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 
EFI_STATUS GetSystemConfigurationTable (IN EFI_GUID *TableGuid, IN OUT VOID **Table)
 
VOID EditorClearLine (IN UINTN Row, IN UINTN LastCol, IN UINTN LastRow)
 
BOOLEAN IsValidFileNameChar (IN CONST CHAR16 Ch)
 
BOOLEAN IsValidFileName (IN CONST CHAR16 *Name)
 
CHAR16 * EditGetDefaultFileName (IN CONST CHAR16 *Extension)
 
EFI_STATUS ReadFileIntoBuffer (IN CONST CHAR16 *FileName, OUT VOID **Buffer, OUT UINTN *BufferSize OPTIONAL, OUT BOOLEAN *ReadOnly)
 

Variables

STATIC CONST CHAR16 mFileName [] = L"Debug1Commands"
 
EFI_HII_HANDLE gShellDebug1HiiHandle = NULL
 

Detailed Description

Main file for NULL named library for debug1 profile shell command functions.

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

Definition in file UefiShellDebug1CommandsLib.c.

Function Documentation

◆ EditGetDefaultFileName()

CHAR16 * EditGetDefaultFileName ( IN CONST CHAR16 *  Extension)

Find a filename that is valid (not taken) with the given extension.

Parameters
[in]ExtensionThe file extension.
Return values
NULLSomething went wrong.
Returns
the valid filename.

Definition at line 260 of file UefiShellDebug1CommandsLib.c.

◆ EditorClearLine()

VOID EditorClearLine ( IN UINTN  Row,
IN UINTN  LastCol,
IN UINTN  LastRow 
)

Clear the line at the specified Row.

Parameters
[in]RowThe row number to be cleared ( start from 1 )
[in]LastColThe last printable column.
[in]LastRowThe last printable row.

Definition at line 148 of file UefiShellDebug1CommandsLib.c.

◆ GetSystemConfigurationTable()

EFI_STATUS GetSystemConfigurationTable ( IN EFI_GUID TableGuid,
IN OUT VOID **  Table 
)

Function returns a system configuration table that is stored in the EFI System Table based on the provided GUID.

Parameters
[in]TableGuidA pointer to the table's GUID type.
[in,out]TableOn exit, a pointer to a system configuration table.
Return values
EFI_SUCCESSA configuration table matching TableGuid was found.
EFI_NOT_FOUNDA configuration table matching TableGuid was not found.

Definition at line 121 of file UefiShellDebug1CommandsLib.c.

◆ IsValidFileName()

BOOLEAN IsValidFileName ( IN CONST CHAR16 *  Name)

Check if file name has illegal characters.

Parameters
NameThe filename to check.
Return values
TRUEThe filename is ok.
FALSEThe filename is not ok.

Definition at line 219 of file UefiShellDebug1CommandsLib.c.

◆ IsValidFileNameChar()

BOOLEAN IsValidFileNameChar ( IN CONST CHAR16  Ch)

Determine if the character is valid for a filename.

Parameters
[in]ChThe character to test.
Return values
TRUEThe character is valid.
FALSEThe character is not valid.

Definition at line 196 of file UefiShellDebug1CommandsLib.c.

◆ ReadFileIntoBuffer()

EFI_STATUS ReadFileIntoBuffer ( IN CONST CHAR16 *  FileName,
OUT VOID **  Buffer,
OUT UINTN *BufferSize  OPTIONAL,
OUT BOOLEAN *  ReadOnly 
)

Read a file into an allocated buffer. The buffer is the responsibility of the caller to free.

Parameters
[in]FileNameThe filename of the file to open.
[out]BufferUpon successful return, the pointer to the address of the allocated buffer.
[out]BufferSizeIf not NULL, then the pointer to the size of the allocated buffer.
[out]ReadOnlyUpon successful return TRUE if the file is read only. FALSE otherwise.
Return values
EFI_NOT_FOUNDThe filename did not represent a file in the file system.
EFI_SUCCESSThe file was read into the buffer.
EFI_OUT_OF_RESOURCESA memory allocation failed.
EFI_LOAD_ERRORThe file read operation failed.
EFI_INVALID_PARAMETERA parameter was invalid.
EFI_INVALID_PARAMETERFileName was NULL.
EFI_INVALID_PARAMETERFileName was a directory.

Definition at line 317 of file UefiShellDebug1CommandsLib.c.

◆ ShellCommandGetManFileNameDebug1()

CONST CHAR16 *EFIAPI ShellCommandGetManFileNameDebug1 ( VOID  )

Gets the debug file name. This will be used if HII is not working.

Return values
NULLNo file is available.
Returns
The NULL-terminated filename to get help from.

Definition at line 23 of file UefiShellDebug1CommandsLib.c.

◆ UefiShellDebug1CommandsLibConstructor()

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

Constructor for the Shell Debug1 Commands library.

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 41 of file UefiShellDebug1CommandsLib.c.

◆ UefiShellDebug1CommandsLibDestructor()

EFI_STATUS EFIAPI UefiShellDebug1CommandsLibDestructor ( 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.

Definition at line 97 of file UefiShellDebug1CommandsLib.c.

Variable Documentation

◆ gShellDebug1HiiHandle

EFI_HII_HANDLE gShellDebug1HiiHandle = NULL

Definition at line 13 of file UefiShellDebug1CommandsLib.c.

◆ mFileName

STATIC CONST CHAR16 mFileName[] = L"Debug1Commands"

Definition at line 12 of file UefiShellDebug1CommandsLib.c.