EDK2 doxygen online documents - Firmware Encoding Index 1
EDK2 doxygen online documents - Firmware Encoding Index
Functions | Variables

ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.c File Reference

#include "UefiShellDebug1CommandsLib.h"

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)
VOID DumpHex (IN UINTN Indent, IN UINTN Offset, IN UINTN DataSize, IN VOID *UserData)
CHAR16 EFIAPI CharToUpper (IN CHAR16 Char)
EFI_STATUS EFIAPI GetSystemConfigurationTable (IN EFI_GUID *TableGuid, IN OUT VOID **Table)
UINTN EFIAPI HexCharToUintn (IN CHAR16 Char)
EFI_STATUS EFIAPI ConvertStringToGuid (IN CONST CHAR16 *StringGuid, IN OUT EFI_GUID *Guid)
VOID EFIAPI EditorClearLine (IN UINTN Row, IN UINTN LastCol, IN UINTN LastRow)
BOOLEAN EFIAPI IsValidFileNameChar (IN CONST CHAR16 Ch)
BOOLEAN EFIAPI IsValidFileName (IN CONST CHAR16 *Name)
CHAR16 *EFIAPI EditGetDefaultFileName (IN CONST CHAR16 *Extension)
EFI_STATUS EFIAPI ReadFileIntoBuffer (IN CONST CHAR16 *FileName, OUT VOID **Buffer, OUT UINTN *BufferSize OPTIONAL, OUT BOOLEAN *ReadOnly)

Variables

STATIC CONST CHAR16 mFileName [] = "Debug1Commands"
EFI_HANDLE gShellDebug1HiiHandle = NULL
STATIC CONST CHAR8 Hex []

Detailed Description

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

Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php

THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.

Definition in file UefiShellDebug1CommandsLib.c.


Function Documentation

CHAR16 EFIAPI CharToUpper ( IN CHAR16  Char)

Convert a Unicode character to upper case only if it maps to a valid small-case ASCII character.

This internal function only deal with Unicode character which maps to a valid small-case ASCII character, i.e. L'a' to L'z'. For other Unicode character, the input character is returned directly.

Parameters:
CharThe character to convert.
Return values:
LowerCharacterIf the Char is with range L'a' to L'z'.
UnchangedOtherwise.

Stolen from MdePkg Baselib

Definition at line 210 of file UefiShellDebug1CommandsLib.c.

EFI_STATUS EFIAPI ConvertStringToGuid ( IN CONST CHAR16 StringGuid,
IN OUT EFI_GUID Guid 
)

Convert a string representation of a guid to a Guid value.

Parameters:
[in]StringGuidThe pointer to the string of a guid.
[in,out]GuidThe pointer to the GUID structure to populate.
Return values:
EFI_INVALID_PARAMETERA parameter was invalid.
EFI_SUCCESSThe conversion was successful.

Definition at line 288 of file UefiShellDebug1CommandsLib.c.

VOID DumpHex ( IN UINTN  Indent,
IN UINTN  Offset,
IN UINTN  DataSize,
IN VOID *  UserData 
)

Dump some hexadecimal data to the screen.

Parameters:
[in]IndentHow many spaces to indent the output.
[in]OffsetThe offset of the printing.
[in]DataSizeThe size in bytes of UserData.
[in]UserDataThe data to print out.

Definition at line 149 of file UefiShellDebug1CommandsLib.c.

CHAR16* EFIAPI 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 487 of file UefiShellDebug1CommandsLib.c.

VOID EFIAPI 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 379 of file UefiShellDebug1CommandsLib.c.

EFI_STATUS EFIAPI 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 233 of file UefiShellDebug1CommandsLib.c.

UINTN EFIAPI HexCharToUintn ( IN CHAR16  Char)

Convert a Unicode character to numerical value.

This internal function only deal with Unicode character which maps to a valid hexadecimal ASII character, i.e. L'0' to L'9', L'a' to L'f' or L'A' to L'F'. For other Unicode character, the value returned does not make sense.

Parameters:
CharThe character to convert.
Returns:
The numerical value converted.

Definition at line 266 of file UefiShellDebug1CommandsLib.c.

BOOLEAN EFIAPI 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 445 of file UefiShellDebug1CommandsLib.c.

BOOLEAN EFIAPI 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 421 of file UefiShellDebug1CommandsLib.c.

EFI_STATUS EFIAPI 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 543 of file UefiShellDebug1CommandsLib.c.

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

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 sucessfully
EFI_UNSUPPORTEDthe shell level required was not found.

Definition at line 46 of file UefiShellDebug1CommandsLib.c.

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


Variable Documentation

Definition at line 18 of file UefiShellDebug1CommandsLib.c.

STATIC CONST CHAR8 Hex[]
Initial value:
 {
  '0',
  '1',
  '2',
  '3',
  '4',
  '5',
  '6',
  '7',
  '8',
  '9',
  'A',
  'B',
  'C',
  'D',
  'E',
  'F'
}

Definition at line 121 of file UefiShellDebug1CommandsLib.c.

STATIC CONST CHAR16 mFileName[] = "Debug1Commands"

Definition at line 17 of file UefiShellDebug1CommandsLib.c.

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Defines