From 3bd89603625eb451b166ee64676c2b31818d1a1f Mon Sep 17 00:00:00 2001 From: Laszlo Ersek Date: Thu, 21 Jan 2016 18:40:40 +0000 Subject: ShellPkg: elevate DumpHex() from Debug1-internal to generic-internal The UEFI Shell specification classifies shell commands into various shell levels / profiles. Currently the DumpHex() internal function is only used by commands that belong to the Debug1 profile exclusively (i.e., they are not required to be present in other than Debug1 profiles): - SMBIOSVIEW - PCI - DMPSTORE - DMEM - DBLK In the next patch, we'd like to call DumpHex() from BCFG as well. However, BCFG is not only required to be present in the Debug1 profile; the Install1 profile contains BCFG as well. For this reason, move DumpHex() from UefiShellDebug1CommandsLib to the more generic UefiShellCommandLib, which "Provides interface to shell internal functions for shell commands". The matching header file is "ShellPkg/Include/Library/ShellCommandLib.h". Cc: Jaben Carsey Cc: Ryan Harkin Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek Reviewed-by: Jaben Carsey git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19717 6f19259b-4bc3-4df7-8a09-765794883524 --- ShellPkg/Include/Library/ShellCommandLib.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'ShellPkg/Include') diff --git a/ShellPkg/Include/Library/ShellCommandLib.h b/ShellPkg/Include/Library/ShellCommandLib.h index 53a56ae5e4..0dd66c2fbc 100644 --- a/ShellPkg/Include/Library/ShellCommandLib.h +++ b/ShellPkg/Include/Library/ShellCommandLib.h @@ -685,4 +685,20 @@ FreeBufferList ( IN BUFFER_LIST *List ); +/** + Function printing hex output to the console. + + @param[in] Indent Number of spaces to indent. + @param[in] Offset Offset to start with. + @param[in] DataSize Length of data. + @param[in] UserData Pointer to some data. +**/ +VOID +DumpHex ( + IN UINTN Indent, + IN UINTN Offset, + IN UINTN DataSize, + IN VOID *UserData + ); + #endif //_SHELL_COMMAND_LIB_ -- cgit v1.2.3