summaryrefslogtreecommitdiffstats
path: root/ShellPkg/Library/UefiHandleParsingLib
Commit message (Collapse)AuthorAgeFilesLines
* ShellPkg/UefiHandleParsingLib: Fix error allocate poolZhichao Gao2019-12-051-4/+8
| | | | | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1965 For function InsertNewGuidNameMapping, it rellocate the mGuidList with new size "mGuidListCount+1 * sizeof(GUID_INFO_BLOCK)". That isn't its purpose and would cause a overflow operation in "mGuidList[mGuidListCount - 1].xxx = xxx". Its purpose is to increase 1 block size of mGuidList. Change it to "(mGuidListCount + 1) * sizeof (GUID_INFO_BLOCK)". Adjust the coding style of this function. Cc: Jaben Carsey <jaben.carsey@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Andrew Fish <afish@apple.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
* ShellPkg: stop using EFI_HANDLE in place of EFI_HII_HANDLELaszlo Ersek2019-10-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The UefiShell*CommandsLib instances have constructor functions that do something like: gHiiHandle = HiiAddPackages (...); ... ShellCommandRegisterCommandName (..., gHiiHandle, ...); and destructor functions that implement the following pattern: HiiRemovePackages (gHiiHandle); The -- semantic, not functional -- problem is that "gHiiHandle" is declared with type EFI_HANDLE, and not EFI_HII_HANDLE, in all of these library instances, even though HiiAddPackages() correctly returns EFI_HII_HANDLE, and HiiRemovePackages() takes EFI_HII_HANDLE. Once we fix the type of "gHiiHandle", it causes sort of a butterfly effect, because it is passed around widely. Track down and update all of those locations. The DynamicCommand lib instances use a similar pattern, so they are affected too. NOTE: in practice, this patch is a no-op, as both EFI_HII_HANDLE and EFI_HANDLE are typedefs to (VOID*). However, we shouldn't use EFI_HANDLE where semantically EFI_HII_HANDLE is passed around. Cc: Jaben Carsey <jaben.carsey@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Zhichao Gao <zhichao.gao@intel.com> Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
* ShellPkg/UefiHandleParsingLib: Remove some unused GuidsShenglei Zhang2019-04-283-51/+0
| | | | | | | | | | | | | | | ExtendedSalBootService.h, ExtendedSalServiceClasses.h and McaInitPmi.h will be deleted. So remove the Guids defined in these Protocols. And also remove strings in uni file. https://bugzilla.tianocore.org/show_bug.cgi?id=1560 Cc: Jaben Carsey <jaben.carsey@intel.com> Cc: Ray Ni <ray.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* ShellPkg: Replace BSD License with BSD+Patent LicenseMichael D Kinney2019-04-094-27/+4
| | | | | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=1373 Replace BSD 2-Clause License with BSD+Patent License. This change is based on the following emails: https://lists.01.org/pipermail/edk2-devel/2019-February/036260.html https://lists.01.org/pipermail/edk2-devel/2018-October/030385.html RFCs with detailed process for the license change: V3: https://lists.01.org/pipermail/edk2-devel/2019-March/038116.html V2: https://lists.01.org/pipermail/edk2-devel/2019-March/037669.html V1: https://lists.01.org/pipermail/edk2-devel/2019-March/037500.html Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* ShellPkg/UefiHandleParsingLib: Remove an unused PCDshenglei2018-09-301-1/+0
| | | | | | | | | | | | | The PCD below is unused, so it has been removed from inf. gEfiShellPkgTokenSpaceGuid.PcdShellPrintBufferSize Cc: Jaben Carsey <jaben.carsey@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: shenglei <shenglei.zhang@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* ShellPkg: Removing ipf which is no longer supported from edk2.chenc22018-06-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removing rules for Ipf sources file: * Remove the source file which path with "ipf" and also listed in [Sources.IPF] section of INF file. * Remove the source file which listed in [Components.IPF] section of DSC file and not listed in any other [Components] section. * Remove the embedded Ipf code for MDE_CPU_IPF. Removing rules for Inf file: * Remove IPF from VALID_ARCHITECTURES comments. * Remove DXE_SAL_DRIVER from LIBRARY_CLASS in [Defines] section. * Remove the INF which only listed in [Components.IPF] section in DSC. * Remove statements from [BuildOptions] that provide IPF specific flags. * Remove any IPF sepcific sections. Removing rules for Dec file: * Remove [Includes.IPF] section from Dec. Removing rules for Dsc file: * Remove IPF from SUPPORTED_ARCHITECTURES in [Defines] section of DSC. * Remove any IPF specific sections. * Remove statements from [BuildOptions] that provide IPF specific flags. Cc: Jaben Carsey <jaben.carsey@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chen A Chen <chen.a.chen@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* ShellPkg: Clean up source filesLiming Gao2018-06-282-63/+63
| | | | | | | | | | 1. Do not use tab characters 2. No trailing white space in one line 3. All files must end with CRLF Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
* ShellPkg/UefiHandleParsingLib: remove TrEE reference.Jiewen Yao2018-03-163-3/+0
| | | | | | | | | | | | TrEE is deprecated. We need use Tcg2. Cc: Jaben Carsey <jaben.carsey@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Chao B Zhang <chao.b.zhang@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Chao B Zhang <chao.b.zhang@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
* ShellPkg/dh: Fix wrong output when dumping PciRootBridgeIoRuiyu Ni2017-11-081-2/+2
| | | | | | Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* ShellPkg/HandleParsingLib: Remove unnecessary CatSPrint callRuiyu Ni2017-10-251-3/+1
| | | | | | Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* ShellPkg: Update Guid usage in ShellLib INF to match source code logicLiming Gao2017-10-101-1/+1
| | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
* ShellPkg/dh: Add the 'dh' dump support for Partition Info protocolHao Wu2017-09-293-1/+89
| | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=655 V2 change: Put some strings into the UNI file for localization. The dump information will include: a. The type of the partition (Mbr, Gpt or Other); b. Whether the partition is an EFI System Partition. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* ShellPkg/UefiHandleParsingLib.c: Map SmmPciRootBridgeIo correctlyHuajing Li2017-09-291-1/+1
| | | | | | | | | | The current implementation has a typo that maps SmmPciRootBridgeIo to "PciRootBridgeIo". Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Huajing Li <huajing.li@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* ShellPkg/dh: Add mapping of new UEFI/PI protocolsHuajing Li2017-09-293-0/+140
| | | | | | | Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Huajing Li <huajing.li@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* ShellPkg/dh: Refine the dump outputRuiyu Ni2017-09-252-68/+69
| | | | | | | | | | The patch doesn't change any real functionality. Only the indent width and EOL are changed. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* ShellPkg/dh: Modify the dump of UsbIo protocolHuajing Li2017-09-251-2/+2
| | | | | | | | Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Huajing Li <huajing.li@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* ShellPkg/dh: Modify the dump of UsbIo protocolHuajing Li2017-09-252-2/+64
| | | | | | | | Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Huajing Li <huajing.li@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* ShellPkg/dh: Modify the dump of PciIo protocolHuajing Li2017-09-252-2/+96
| | | | | | | | Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Huajing Li <huajing.li@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* ShellPkg/dh: Modify the dump of GraphicsOutput protocolHuajing Li2017-09-251-18/+18
| | | | | | | | Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Huajing Li <huajing.li@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* ShellPkg/dh: Modify the dump of DebugSupport protocolHuajing Li2017-09-252-1/+68
| | | | | | | | Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Huajing Li <huajing.li@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* ShellPkg/dh: Modify the dump of BlockIo protocolHuajing Li2017-09-252-1/+80
| | | | | | | | Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Huajing Li <huajing.li@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* ShellPkg/dh: Modify the dump of BusSpecificDriverOverride protocolHuajing Li2017-09-252-2/+81
| | | | | | | | Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Huajing Li <huajing.li@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* ShellPkg/dh: Modify the dump of LoadedImage protocolHuajing Li2017-09-254-12/+21
| | | | | | | | Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Huajing Li <huajing.li@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* ShellPkg/dh: Modify the dump of "ImageDevicePath" and "DevicePath"Huajing Li2017-09-251-22/+46
| | | | | | | | Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Huajing Li <huajing.li@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* ShellPkg/HandleParsingLib: Show LoadedImageProtocol file nameJeff Westfahl2017-05-112-1/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for showing the file name associated with a LoadedImageProtocol file path. This is a behavior that was present in the old shell but has been lost in the new shell. For example, using 'dh -v' in the old shell: Handle D3 (3A552218) Image (3A54C918) File:MicrocodeUpdate ParentHandle..: 3A666398 vs. the new shell: D3: 3A552218 LoadedImage Revision......: 0x00001000 ParentHandle..: 3A666398 Here's what the output of 'dh -v' looks like after this patch: D3: 3A552218 LoadedImage Name..........: MicrocodeUpdate Revision......: 0x00001000 ParentHandle..: 3A666398 This seems like useful information for the shell to display. Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Westfahl <jeff.westfahl@ni.com> Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* ShellPkg/HandleParsingLib: Open LoadedImageProtocol firstJeff Westfahl2017-05-111-8/+7
| | | | | | | | | | | | | This patch changes the order of operations to make sure we can open the LoadedImageProtocol before getting the format string. This should not affect functionality, and makes the next patch easier to review. Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Westfahl <jeff.westfahl@ni.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* ShellPkg/HandleParsingLib: Show LoadedImageProtocol file path as textJeff Westfahl2017-05-112-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for displaying a text representation of the file path associated with a LoadedImageProtocol. This is a behavior that was present in the old shell but has been lost in the new shell. For example, using 'dh -v' in the old shell: FilePath......: FvFile(F3331DE6-4A55-44E4-B767-7453F7A1A021) FilePath......: \EFI\BOOT\BOOTX64.EFI vs. the new shell: FilePath......: 3A539018 FilePath......: 3A728718 This seems like useful information for the shell to display. Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Westfahl <jeff.westfahl@ni.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* ShellPkg/UefiHandleParsingLib: Fix memory leakRuiyu Ni2017-05-031-1/+3
| | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Signed-off-by: Chen A Chen <chen.a.chen@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* ShellPkg/HandleParsingLib: Correct format specifier for LoadedImageJeff Westfahl2017-03-171-1/+1
| | | | | | | | | | | | | | | | The format specifier for the LoadOptions field of the LoadedImage protocol is "%s". However, the data in LoadOptions is often generic binary data. A format specifier of "%x" is more appropriate for this field. Using "dh -v" with format specifier "%s" on BIOS images based on EDK II source before commit 891d844 can cause a crash. Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Westfahl <jeff.westfahl@ni.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* ShellPkg/HandleParsingLib: Fix build failure due to missing semicolonRuiyu Ni2017-01-111-1/+1
| | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
* ShellPkg/HandleParsingLib: Add new API GetAllMappingGuidsChen A Chen2017-01-111-0/+52
| | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Signed-off-by: Chen A Chen <chen.a.chen@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* ShellPkg/HandleParsingLib: Return NULL name for unknown GUIDRuiyu Ni2017-01-112-24/+22
| | | | | | | | | | GetStringNameFromGuid() returns NULL for unknown GUID, instead of returning "UnknownDevice". The behavior change matches ShellProtocol.GetGuidName(). Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* ShellPkg/HandleParsingLib: Rename global variablesRuiyu Ni2017-01-111-18/+18
| | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* ShellPkg: Update sources to include MdePkg protocol definitionsRuiyu Ni2016-10-191-4/+4
| | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* ShellPkg/UefiShellParsingLib: Remove unnecessary EFIAPIChen A Chen2016-10-091-6/+0
| | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chen A Chen <chen.a.chen@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Ruiyu Ni <Ruiyu.ni@intel.com>
* ShellPkg/UefiHandleParsingLib: fix retval for empty child controller arrayLaszlo Ersek2016-09-081-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ParseHandleDatabaseForChildControllers() function intends to work like this: (1) It allocates a "HandleBufferForReturn" local array that's guaranteed to be big enough for all found handles, (2) it collects the handles, both counting them in the (mandatory) "MatchingHandleCount" output parameter, and saving them in the local "HandleBufferForReturn" array, (3) if the caller is not interested in the actual handles, then "HandleBufferForReturn" is released, (4) if the caller is interested in the handles, and we've found some, then "HandleBufferForReturn" is passed out through the "MatchingHandleBuffer" output parameter, (5) if the caller is interested in the actual handles, but we've found none, then the "MatchingHandleBuffer" output parameter is set to NULL. The ASSERT() at the end of the function makes this clear, but the implementation does not conform to (5). Fix it. Cc: Jaben Carsey <jaben.carsey@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Tapan Shah <tapandshah@hpe.com> Reported-by: Tapan Shah <tapandshah@hpe.com> Ref: https://tianocore.acgmultimedia.com/show_bug.cgi?id=112 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Tapan Shah <tapandshah@hpe.com>
* ShellPkg/UefiHandleParsingLib: fix IN/OUT notation in child ctrlr parsingLaszlo Ersek2016-09-081-2/+2
| | | | | | | | | | | | | "MatchingHandleCount" is an output parameter of ParseHandleDatabaseForChildControllers(). Cc: Jaben Carsey <jaben.carsey@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Tapan Shah <tapandshah@hpe.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Tapan Shah <tapandshah@hpe.com>
* ShellPkg: Correct files with CRLF line endingLiming Gao2016-07-292-12/+12
| | | | | | | | Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* ShellPkg/UefiHandleParsingLib: Fix issue to pass static code checkerRuiyu Ni2016-07-251-2/+11
| | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
* ShellPkg/UefiHandleParsingLib.c: Handle memory allocation failureRuiyu Ni2016-07-181-24/+31
| | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* Fix GUID dereferenceThomas Palmer2016-07-061-3/+3
| | | | | | | | | Print's "%g" argument requires a EFI_GUID pointer, not the EFI_GUID value. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Thomas Palmer <thomas.palmer@hpe.com> Reviewed-By: Jaben Carsey <jaben.carsey@intel.com>
* ShellPkg: UefiHandleParsingLib: remove tautological comparisonLaszlo Ersek2016-06-301-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | The code being removed in this patch dates back to git commit a405b86d274d (Sep 14, 2010; "udk2010.up2.shell initial release."). The condition always evaluates to true, and it breaks DEBUG builds of ArmVirtPkg with gcc-6.1: ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c: In function 'ParseHandleDatabaseByRelationshipWithType': ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c:2465:76: error: self-comparison always evaluates to true [-Werror=tautological-compare] ASSERT((*HandleType)[HandleIndex] == (*HandleType)[HandleIndex]); Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Cc: Michael Zimmermann <sigmaepsilon92@gmail.com> Reported-by: Gerd Hoffmann <kraxel@redhat.com> Reported-by: Michael Zimmermann <sigmaepsilon92@gmail.com> Suggested-by: Jaben Carsey <jaben.carsey@intel.com> Ref: http://thread.gmane.org/gmane.comp.bios.edk2.devel/13794/focus=13939 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* ShellPkg/UefiHandleParsing: Show handle's loaded image device pathRuiyu Ni2016-06-211-15/+68
| | | | | | | | | The patch fixed a bug in UefiHandleParsingLib to show handle's loaded image device path. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* ShellPkg/UefiHandleParsingLib.c: Unify EOL and remove trailing spaceRuiyu Ni2016-06-171-183/+173
| | | | | | | | | The patch doesn't change any code logic. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* ShellPkg: Use ".." to indicate device path is partially displayedRuiyu Ni2016-06-171-1/+4
| | | | | | | | | | | | | | | The output of "dh <handle>" originally is like below: 12C: USBIO DevicePath(x0)/Pci(0x14,0x0)/USB(0x6,0x0)) The device path part is very confusing. Use ".." in front of the partially displayed device path is better and it also aligns to the example output in Shell spec. 12C: USBIO DevicePath(..)/Pci(0x14,0x0)/USB(0x6,0x0)) Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* ShellPkg: Add NULL pointer check.Qiu Shumin2016-04-291-3/+17
| | | | | | | | | | Add pointer check to avoid NULL pointer dereferenced. Cc: Jaben Carsey <jaben.carsey@intel.com> Cc: Tapan Shah <tapandshah@hpe.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: Tapan Shah <tapandshah@hpe.com>
* ShellPkg: Fix typos and EDK2 coding style issuesTapan Shah2016-04-271-10/+10
| | | | | | | | | Fixing typos and EDK2 coding style issues found from previous submit Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Tapan Shah <tapandshah@hpe.com> Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* ShellPkg: Enahance 'dh' command to add more protocols decoding supportTapan Shah2016-04-253-8/+186
| | | | | | | | | | Adding EdidDiscovered, EdidActive protocol decode support a in 'dh' command. Extending GraphicsOutput protocol decoding to list all supported GOP resolutions. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Tapan Shah <tapandshah@hpe.com> Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* ShellPkg: Update Guid/Protocol usages in INF files.Liming Gao2016-04-131-12/+12
| | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Shumin Qiu <shumin.qiu@intel.com>
* ShellPkg: Refine the comparisons code in ShellPkg.Qiu Shumin2016-03-291-7/+7
| | | | | | | | | For Boolean values not use explicit comparisons to TRUE or FALSE. For non-Boolean comparisons we should use a compare operator. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>