summaryrefslogtreecommitdiff
path: root/ShellPkg
AgeCommit message (Collapse)Author
2017-04-07ShellPkg/SetVar: Fix typo in commentsDandan Bi
Cc: Ruiyu Ni <ruiyu.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
2017-04-07ShellPkg: Fix Shell to not return without startup.nsh after timeoutRuiyu Ni
When user doesn't press key to exit the timeout waiting in Shell, and there is no startup.nsh, Shell exits with failure status. aaf51f08ee104447207bba571649556095befc93 introduced this bug. The patch fixes this issue. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Chen A Chen <chen.a.chen@intel.com>
2017-04-05ShellPkg/setvar: Add assertion indicating TempData shouldn't be NULLRuiyu Ni
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
2017-03-31ShellPkg/setvar: Support data format in Shell 2.2 specChen A Chen
Shell 2.2 spec defines =0x/=0X, =H/=h, =S, =L and =P for hex number, hex array, ascii string, unicode string and device path data. The patch adds such support. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chen A Chen <chen.a.chen@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Cc: Jeff Fan <jeff.fan@intel.com>
2017-03-29ShellPkg/Shell: Avoid potential null pointer deferenceRuiyu Ni
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
2017-03-28ShellPkg/Shell: Make comments align with the functionDandan Bi
Cc: Chen A Chen <chen.a.chen@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
2017-03-27ShellPkg/mm: Support UINT16 segment numberRuiyu Ni
It's to follow the Shell 2.2 spec. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
2017-03-23ShellPkg: Add Shell invocation option '-exit'Chen A Chen
According to Shell spec 2.2 '-exit' invocation option is used to specify that after running the command line when launched, the UEFI Shell must immediately exit. 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>
2017-03-23ShellPkg: Fix shell not able to run startup.nshChen A Chen
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chen A Chen <chen.a.chen@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
2017-03-22ShellPkg: add GUID declaration for FILE_GUID of UEFI Shell app to packageArd Biesheuvel
In QuarkPlatformPkg/Library/PlatformBootManagerLib/PlatformBootManager.c, there is a definition of mUefiShellFileGuid which is a constant reference to the FILE_GUID as defined in ShellPkg/Application/Shell/Shell.inf. To prevent the need for duplicating it to other modules, promote it to a proper global GUID, and add it to the ShellPkg.dec package declaration. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
2017-03-17ShellPkg/HandleParsingLib: Correct format specifier for LoadedImageJeff Westfahl
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>
2017-03-16ShellPkg UefiDpLib: Handle "/" separator in debug path for GCC buildStar Zeng
Cc: Liming Gao <liming.gao@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
2017-03-15ShellPkg/UefiShellBcfgCommandLib: Fix VS2012 build failureDandan Bi
Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
2017-03-06ShellPkg/comp: Use proper parameter namesRuiyu Ni
The patch doesn't impact the functionality. The rename also fixes the inconsistency between function header comments and function parameters. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
2017-03-06ShellPkg: Refine casting expression result to bigger sizeHao Wu
There are cases that the operands of an expression are all with rank less than UINT64/INT64 and the result of the expression is explicitly cast to UINT64/INT64 to fit the target size. An example will be: UINT32 a,b; // a and b can be any unsigned int type with rank less than UINT64, like // UINT8, UINT16, etc. UINT64 c; c = (UINT64) (a + b); Some static code checkers may warn that the expression result might overflow within the rank of "int" (integer promotions) and the result is then cast to a bigger size. The commit refines codes by the following rules: 1). When the expression is possible to overflow the range of unsigned int/ int: c = (UINT64)a + b; 2). When the expression will not overflow within the rank of "int", remove the explicit type casts: c = a + b; 3). When the expression will be cast to pointer of possible greater size: UINT32 a,b; VOID *c; c = (VOID *)(UINTN)(a + b); --> c = (VOID *)((UINTN)a + b); 4). When one side of a comparison expression contains only operands with rank less than UINT32: UINT8 a; UINT16 b; UINTN c; if ((UINTN)(a + b) > c) {...} --> if (((UINT32)a + b) > c) {...} For rule 4), if we remove the 'UINTN' type cast like: if (a + b > c) {...} The VS compiler will complain with warning C4018 (signed/unsigned mismatch, level 3 warning) due to promoting 'a + b' to type 'int'. Contributed-under: TianoCore Contribution Agreement 1.0 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>
2017-03-06ShellPkg: Refine type cast for pointer subtractionHao Wu
For pointer subtraction, the result is of type "ptrdiff_t". According to the C11 standard (Committee Draft - April 12, 2011): "When two pointers are subtracted, both shall point to elements of the same array object, or one past the last element of the array object; the result is the difference of the subscripts of the two array elements. The size of the result is implementation-defined, and its type (a signed integer type) is ptrdiff_t defined in the <stddef.h> header. If the result is not representable in an object of that type, the behavior is undefined." In our codes, there are cases that the pointer subtraction is not performed by pointers to elements of the same array object. This might lead to potential issues, since the behavior is undefined according to C11 standard. Also, since the size of type "ptrdiff_t" is implementation-defined. Some static code checkers may warn that the pointer subtraction might underflow first and then being cast to a bigger size. For example: UINT8 *Ptr1, *Ptr2; UINTN PtrDiff; ... PtrDiff = (UINTN) (Ptr1 - Ptr2); The commit will refine the pointer subtraction expressions by casting each pointer to UINTN first and then perform the subtraction: PtrDiff = (UINTN) Ptr1 - (UINTN) Ptr2; Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Acked-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
2017-03-02ShellPkg: Link DxeSmmPerformanceLib to make DP command genericStar Zeng
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=412 Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
2017-03-01ShellPkg/bcfg: Add Shell Spec 2.2 modification functionalityChen A Chen
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>
2017-03-01ShellPkg/Debug1CommandLib: Use StrToGuid/StrHexToBytes in BaseLibRuiyu Ni
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
2017-02-28ShellPkg/comp: Fix GCC build failureRuiyu Ni
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
2017-02-28ShellPkg/comp: Add "-n <diff-count>"/"-s <diff-byte>" supportChen A Chen
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chen A Chen <chen.a.chen@intel.com> Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
2017-02-28ShellPkg/comp: Rename variable names to proper onesChen A Chen
The change doesn't impact the functionality. 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>
2017-02-28ShellPkg/UefiDpLib: Add check to avoid NULL pointer deferenceHao Wu
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
2017-02-24ShellPkg UefiDpLib: Fixed GCC build failure caused by ef22403Star Zeng
Cc: Michael Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
2017-02-23ShellPkg UefiDpLib: Remove TimerLib dependencyStar Zeng
Current UefiDpLib implementation depends on TimerLib, as different platforms may implement and use their own TimerLib, it makes the dp command needs to be built by platform. The TimerLib dependency can be removed by using performance property configuration table to make UefiDpLib to be generic. Cc: Andrew Fish <afish@apple.com> Cc: Michael Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Cinnamon Shia <cinnamon.shia@hpe.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Andrew Fish <afish@apple.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
2017-02-16ShellPkg/pci: Report error when invalid value is specified for "-ec"Ruiyu Ni
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
2017-02-10ShellPkg SmbiosView: Correct some outputs for Type 0/3/10Star Zeng
Type 0: Update "EDD Enhanced Disk Driver)..." to "EDD (Enhanced Disk Driver)..." for STR_SMBIOSVIEW_PRINTINFO_EDD_ENHANCED_DRIVER Type 3: Use L" Laptop" instead of L" LapTop" in SystemEnclosureTypeTable to match SMBIOS spec. Type 10: The BIT7 of Device Type is representing the status of device whether it is enabled or disabled. But current code is not considering the BIT7 and will print "Undefined Value" for enabled device. Type 41 has same definition of Device Type, the code is correct and will be applied to Type 10 by this patch. Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
2017-02-10ShellPkg SmbiosView: Eliminate trailing " | " in PrintBitsInfo()Star Zeng
Current PrintBitsInfo() will always print an additional trailing " | " for the bit flags, for example, Base Board Feature Flags: Hosting board | Replaceable | Th patch is to eliminate trailing " | " in PrintBitsInfo(), then the output will be like below Base Board Feature Flags: Hosting board | Replaceable Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
2017-02-03ShellPkg/cd: Do not print the destination dir when CD exitsRuiyu Ni
Before the "cd fs0:dir" fix, CD only prints destination directory when the destination contains ":". However, the "cd fs0:dir" fix changed CD to always print destination directory. This patch changes CD to never print destination directory. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> Cc: Chris J Phillips <chrisp@hpe.com> Reviewed-by: Tapan Shah <tapandshah@hpe.com>
2017-01-25ShellPkg/pci: Fix extended register dumping for MFVC capabilityRuiyu Ni
https://bugzilla.tianocore.org/show_bug.cgi?id=355 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
2017-01-25ShellPkg/pci: Support interpreting specific PCIE ext cap thru "-ec"Ruiyu Ni
The implementation was already there but through a private flag "-_e". The patch removes "-_e" support and add "-ec" support. Removing old "-_e" support makes the pci command more clean. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
2017-01-25ShellPkg/pci: Use PCI definitions defined in MdePkgRuiyu Ni
https://bugzilla.tianocore.org/show_bug.cgi?id=354 The patch removes the local PCI definitions and uses the definitions defined in MdePkg/Include/IndustryStandard folder. There is no functionality impact. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jaben Carsey <jarben.carsey@intel.com>
2017-01-24ShellPkg SmbiosView: Add decoding of SMBIOS spec 3.1.1Star Zeng
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=349 Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
2017-01-22ShellPkg SmbiosView: Add decoding of SMBIOS spec 3.1.0Star Zeng
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=340 The decoding of TPM Device (Type 43) has been added at e9f0be021b7649c15d823e193110c0088cda9a89. Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
2017-01-19ShellPkg: Add check logic for the gateway validity.Zhang Lubo
if we set a static IP using command 'ifconfig -s eth0 static 192.168.0.121 255.255.255.0 0.0.0.0' The system says 'Failed to set address.' but using 'ifconfig -l', the static IP can be assigned successfully. so we need to check the gateway validity before setting manual address to keep the ifconfig -s command more consistent. Signed-off-by: Zhang Lubo <lubo.zhang@intel.com> Cc: Santhapur Naveen <naveens@amiindia.co.in> Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Cc: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
2017-01-19ShellPkg/HandleParsingLib: Fix coding style issueDandan Bi
Cc: Jaben Carsey <jaben.carsey@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
2017-01-19ShellPkg SmbiosView: Add missing decoding of SMBIOS spec 3.0.0Star Zeng
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=345 When I am adding SMBIOS spec 3.1.0 support, I found the decoding of SMBIOS spec 3.0.0 for some definitions is missing. Cc: Jaben Carsey <jaben.carsey@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
2017-01-19ShellPkg SmbiosView: Add missing decoding of SlotType AGP8XStar Zeng
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=344 SlotType AGP8X was added in SMBIOS spec 2.3.4, but the decoding of it is missing. I found it when I am adding SMBIOS spec 3.1.0 support. Cc: Jaben Carsey <jaben.carsey@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
2017-01-13ShellPkg/Ifconfig6: Address ASSERT because of a missing NULL checkhegdenag
When we issue 'ifconfig6 -s <interface> auto' system hangs with an ASSERT in StrLen. in IfConfig6SetInterfaceInfo, for 'auto' case we added checks to rule out the invalid inputs like 'host', 'gw' and 'dns'. To parse through this, we do a VarArg = VarArg->Next but we dont check new VarArg before calling StrCmp. Fix with a check in this patch. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com> Reviewed-by: Zhang Lubo <lubo.zhang@intel.com> Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Sriram Subramanian <sriram-s@hpe.com>
2017-01-13ShellPkg/SmbiosView: Add decoding of SMBIOS record type 43Linson Augustine
Added decoding of the new SMBIOS Type 43 record. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Augustine Linson P <linson.augustine@hpe.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
2017-01-12ShellPkg: Update smbiosview command to display Type 3 valuesChris Phillips
The smbiosview command was not displaying SMBIOS Type 3 Height, NumberofPowerCords, or SKU Number. Added handling to display these values. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chris Phillips <chrisp@hpe.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
2017-01-11ShellPkg/Shell: Add double quotes to args with white spaceMichael Kinney
https://bugzilla.tianocore.org/show_bug.cgi?id=332 When the ShellLib ShellExecute() API or the Shell Protocol Execute() API are used to execute a command, the arguments are parsed to produce the Argc/Argv list in the Shell Parameters Protocol and double quotes are removed from arguments that are surrounded by double quotes. This is the required behavior of the Shell Parameters Protocol. The ProcessCommandLine() function in the shell implementation uses the Argc/Argv list from the Shell Parameters Protocol to assemble a new command line, but the double quotes that may have been originally present for an argument are not preserved. ProcessCommandLine() is updated to check if an argument added to the generated command line contains one or more white space characters, and if it does, double quotes are added around the argument. Cc: Jaben Carsey <jaben.carsey@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Ruiyu Ni <Ruiyu.ni@intel.com>
2017-01-11ShellPkg/HandleParsingLib: Fix build failure due to missing semicolonRuiyu Ni
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
2017-01-11ShellPkg/dh: Support dump from GUID and "decode" parameterRuiyu Ni
To follow Shell spec 2.2, change "dh" to support dump from protocol GUID and support "decode" parameter to dump the GUID/name mapping. Contributed-under: TianoCore Contribution Agreement 1.0 Cc: Jaben Carsey <jaben.carsey@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Signed-off-by: Chen A Chen <chen.a.chen@intel.com> Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
2017-01-11ShellPkg/Dh: Fix coding style issuesChen A Chen
The change doesn't impact the functionality. Contributed-under: TianoCore Contribution Agreement 1.0 Cc: Jaben Carsey <jaben.carsey@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> 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>
2017-01-11ShellPkg/HandleParsingLib: Add new API GetAllMappingGuidsChen A Chen
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>
2017-01-11ShellPkg/HandleParsingLib: Return NULL name for unknown GUIDRuiyu Ni
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>
2017-01-11ShellPkg/HandleParsingLib: Rename global variablesRuiyu Ni
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
2017-01-06ShellPkg: Fix a bug ">>v" cannot append data to environment variableChen A Chen
When ">v" is used to redirect the command output to environment variable, the ending "\r\n\0" is removed before setting to environment variable but the length is not updated. It causes ">>v" fails to append data to the environment variable created by ">v". The patch fixes the above bug. Signed-off-by: Chen A Chen <chen.a.chen@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
2016-12-29ShellPkg/cd: Fix "cd" to support "fs0:dir" (no slash after ':')Ruiyu Ni
When "fs0:dir"(drive letter without slash) is used as destination of "cd", "cd" tries to change to "dir" in root directory of "fs0:". It's incorrect. The correct behavior is to change to "dir" in current directory of "fs0:" 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>