summaryrefslogtreecommitdiffstats
path: root/ShellPkg
Commit message (Collapse)AuthorAgeFilesLines
* ShellPkg/SetVar: Fix typo in commentsDandan Bi2017-04-071-1/+1
| | | | | | | 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>
* ShellPkg: Fix Shell to not return without startup.nsh after timeoutRuiyu Ni2017-04-071-0/+5
| | | | | | | | | | | 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>
* ShellPkg/setvar: Add assertion indicating TempData shouldn't be NULLRuiyu Ni2017-04-051-1/+2
| | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
* ShellPkg/setvar: Support data format in Shell 2.2 specChen A Chen2017-03-311-126/+297
| | | | | | | | | | | | | | 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>
* ShellPkg/Shell: Avoid potential null pointer deferenceRuiyu Ni2017-03-291-0/+6
| | | | | | 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>
* ShellPkg/Shell: Make comments align with the functionDandan Bi2017-03-281-2/+2
| | | | | | | | 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>
* ShellPkg/mm: Support UINT16 segment numberRuiyu Ni2017-03-272-20/+20
| | | | | | | | 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>
* ShellPkg: Add Shell invocation option '-exit'Chen A Chen2017-03-232-3/+3
| | | | | | | | | | 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>
* ShellPkg: Fix shell not able to run startup.nshChen A Chen2017-03-231-58/+56
| | | | | | | 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>
* ShellPkg: add GUID declaration for FILE_GUID of UEFI Shell app to packageArd Biesheuvel2017-03-222-1/+4
| | | | | | | | | | | | | 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>
* 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 UefiDpLib: Handle "/" separator in debug path for GCC buildStar Zeng2017-03-161-1/+1
| | | | | | | | | | 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>
* ShellPkg/UefiShellBcfgCommandLib: Fix VS2012 build failureDandan Bi2017-03-151-0/+1
| | | | | | | | | 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>
* ShellPkg/comp: Use proper parameter namesRuiyu Ni2017-03-061-5/+5
| | | | | | | | | 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>
* ShellPkg: Refine casting expression result to bigger sizeHao Wu2017-03-062-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* ShellPkg: Refine type cast for pointer subtractionHao Wu2017-03-065-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* ShellPkg: Link DxeSmmPerformanceLib to make DP command genericStar Zeng2017-03-021-1/+1
| | | | | | | | | | | | | 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>
* ShellPkg/bcfg: Add Shell Spec 2.2 modification functionalityChen A Chen2017-03-013-3/+360
| | | | | | 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>
* ShellPkg/Debug1CommandLib: Use StrToGuid/StrHexToBytes in BaseLibRuiyu Ni2017-03-014-159/+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>
* ShellPkg/comp: Fix GCC build failureRuiyu Ni2017-02-281-0/+1
| | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
* ShellPkg/comp: Add "-n <diff-count>"/"-s <diff-byte>" supportChen A Chen2017-02-282-155/+229
| | | | | | | 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>
* ShellPkg/comp: Rename variable names to proper onesChen A Chen2017-02-281-23/+23
| | | | | | | | 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>
* ShellPkg/UefiDpLib: Add check to avoid NULL pointer deferenceHao Wu2017-02-281-1/+1
| | | | | | 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>
* ShellPkg UefiDpLib: Fixed GCC build failure caused by ef22403Star Zeng2017-02-241-1/+1
| | | | | | | | | | | 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>
* ShellPkg UefiDpLib: Remove TimerLib dependencyStar Zeng2017-02-239-56/+25
| | | | | | | | | | | | | | | | | | | | | 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>
* ShellPkg/pci: Report error when invalid value is specified for "-ec"Ruiyu Ni2017-02-162-7/+16
| | | | | | 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 SmbiosView: Correct some outputs for Type 0/3/10Star Zeng2017-02-103-3/+4
| | | | | | | | | | | | | | | | | | | | | | 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>
* ShellPkg SmbiosView: Eliminate trailing " | " in PrintBitsInfo()Star Zeng2017-02-101-5/+13
| | | | | | | | | | | | | | | | | | 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>
* ShellPkg/cd: Do not print the destination dir when CD exitsRuiyu Ni2017-02-031-3/+1
| | | | | | | | | | | | | | | 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>
* ShellPkg/pci: Fix extended register dumping for MFVC capabilityRuiyu Ni2017-01-251-1/+2
| | | | | | | | 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>
* ShellPkg/pci: Support interpreting specific PCIE ext cap thru "-ec"Ruiyu Ni2017-01-252-42/+34
| | | | | | | | | | 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>
* ShellPkg/pci: Use PCI definitions defined in MdePkgRuiyu Ni2017-01-252-721/+284
| | | | | | | | | | | | 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>
* ShellPkg SmbiosView: Add decoding of SMBIOS spec 3.1.1Star Zeng2017-01-244-3/+57
| | | | | | | | | | | 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>
* ShellPkg SmbiosView: Add decoding of SMBIOS spec 3.1.0Star Zeng2017-01-224-2/+102
| | | | | | | | | | | | | 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>
* ShellPkg: Add check logic for the gateway validity.Zhang Lubo2017-01-192-2/+20
| | | | | | | | | | | | | | | | | | 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>
* ShellPkg/HandleParsingLib: Fix coding style issueDandan Bi2017-01-191-2/+2
| | | | | | | | 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>
* ShellPkg SmbiosView: Add missing decoding of SMBIOS spec 3.0.0Star Zeng2017-01-192-1/+97
| | | | | | | | | | | | | 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>
* ShellPkg SmbiosView: Add missing decoding of SlotType AGP8XStar Zeng2017-01-191-1/+5
| | | | | | | | | | | | | | 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>
* ShellPkg/Ifconfig6: Address ASSERT because of a missing NULL checkhegdenag2017-01-131-13/+14
| | | | | | | | | | | | | | | 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>
* ShellPkg/SmbiosView: Add decoding of SMBIOS record type 43Linson Augustine2017-01-134-2/+95
| | | | | | | | 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>
* ShellPkg: Update smbiosview command to display Type 3 valuesChris Phillips2017-01-121-3/+16
| | | | | | | | | 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>
* ShellPkg/Shell: Add double quotes to args with white spaceMichael Kinney2017-01-111-9/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* 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/dh: Support dump from GUID and "decode" parameterRuiyu Ni2017-01-112-84/+292
| | | | | | | | | | | | | 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>
* ShellPkg/Dh: Fix coding style issuesChen A Chen2017-01-111-65/+54
| | | | | | | | | | | 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>
* ShellPkg/HandleParsingLib: Add new API GetAllMappingGuidsChen A Chen2017-01-112-1/+72
| | | | | | | 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-113-32/+34
| | | | | | | | | | 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: Fix a bug ">>v" cannot append data to environment variableChen A Chen2017-01-061-1/+5
| | | | | | | | | | | | | 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>
* ShellPkg/cd: Fix "cd" to support "fs0:dir" (no slash after ':')Ruiyu Ni2016-12-291-176/+241
| | | | | | | | | | | | 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>