summaryrefslogtreecommitdiff
path: root/Core/ShellPkg/Library
AgeCommit message (Collapse)Author
2017-07-12ShellPkg: Fix typo errors in ifconfig help outputTapan Shah
Found few instances where IPv4 and DHCPv4 spelled incorrectly as IP4 and DHCP4 respectively. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Tapan Shah <tapandshah@hpe.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> (cherry picked from commit 97f1cd597e01b9c96a1be9b33d7785362269506e)
2017-07-12Shell/alias: Print detailed error when deleting aliasRuiyu Ni
STR_GEN_ERR_NOT_FOUND is added and currently is only used by alias command. This string template can be used by other commands as well. 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: Tapan Shah <tapandshah@hpe.com> (cherry picked from commit 937bc66e1e555e74acdeba766b12c06fd506e408)
2017-07-12ShellPkg/ifconfig: Update help messagehegdenag
Couple of instances had IP4 mentioned, instead of IPv4. Changing all to IPv4 to maintain consistency. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com> Reviewed-by: Tapan Shah <tapandshah@hpe.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com> (cherry picked from commit c1f4b86ba786cc9cbe5c88a05abc9bf0554b1cc8)
2017-07-12ShellPkg/parse: Handle Unicode stream from pipe correctlyRuiyu Ni
The original code expects the Unicode stream from pipe doesn't contains the Unicode BOM. But that's not true. Commit [9ed21946c76e430097e9c4e59b419af928e0cb8c] changes CreateFileInterfaceMem() to add the BOM for Unicode stream. When parse pipe support was firstly added, a private implementation ParseReturnStdInLine() was created to specially handle the Unicode stream without BOM. Since now the Unicode steam contains BOM, the private implementation can be removed and ShellFileHandleReturnLine() can be used directly. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Tapan Shah <tapandshah@hpe.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> (cherry picked from commit 4e6394455a8a9741dafe2928373db461ef21671e)
2017-07-12ShellPkg/alias: Return status for alias deletionRuiyu Ni
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Tapan Shah <tapandshah@hpe.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> (cherry picked from commit 7bd5a2c81ed5bc52ed63b348fcb1686f1fb5b398)
2017-07-12ShellPkg/UefiShellLib: Avoid reading undefined content before stringHao Wu
https://bugzilla.tianocore.org/show_bug.cgi?id=566 In function InternalShellPrintWorker(), if the string in variable 'mPostReplaceFormat2' starts with character L'%', the following expression: *(ResumeLocation-1) == L'^' at line 2831 will read an undefined value before the starting of string 'mPostReplaceFormat2'. This commit adds additional logic to avoid reading undefined content. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> (cherry picked from commit d727614c913449a59e8333c4d75cff4ebf1f9779)
2017-07-12ShellPkg/UefiShellLib: Check correct variable for NULLJeff Westfahl
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: Jaben Carsey <jaben.carsey@intel.com> (cherry picked from commit 5220897839dd583e9d1f749fb4d8196ff86ccc8b)
2017-07-12ShellPkg/memmap: Dump memory map information for all memory typesRuiyu Ni
The patch dumps memory map information for all memory types. But to follow the SFO format of "memmap" defined in Shell 2.2 spec, the patch doesn't dump the memory map information for OEM/OS memory types. But it does include the OEM/OS memory in the total size in SFO format. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> (cherry picked from commit 8bb61740d47b0788bc313f113cbad4a78b55101e)
2017-07-12ShellPkg/memmap: Refine codeRuiyu Ni
The patch changes Buffer to Descriptors, changes (UINT8 *Walker) to (EFI_MEMORY_DESCRIPTOR *Walker). The change makes lots of type conversion unnecessary. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> (cherry picked from commit ac25ebdccc667ecf8397c7310f66e8e2fcfacb26)
2017-07-12ShellPkg/HandleParsingLib: Show LoadedImageProtocol file nameJeff Westfahl
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> (cherry picked from commit f4ac4354652b2bcf4f138b5ebd79b2f07710d4ef)
2017-07-12ShellPkg/HandleParsingLib: Open LoadedImageProtocol firstJeff Westfahl
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> (cherry picked from commit bbb212afa0f8e33e0b686a1b6ffd85d353eed83d)
2017-07-12ShellPkg/HandleParsingLib: Show LoadedImageProtocol file path as textJeff Westfahl
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> (cherry picked from commit c15323ae2e79ee9b0779b030605d5d4c204d624a)
2017-07-12ShellPkg/ShellCommandLib: Update DumpHex to print {|}~Jeff Westfahl
ASCII characters {|}~ should be printed by DumpHex. The problem is that if you have a string like {xizzy}~{foo|bar}~{quux} in the dumped data, it will not appear as such in the *-delimited ASCII column to the right, but as .xizzy...foo.bar...quux. which is less than ideal. Most of the commit message was inspired by/shamelessly stolen from Laszlo's example: https://lists.01.org/pipermail/edk2-devel/2017-April/010266.html 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: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> (cherry picked from commit 4bf3b994e8b207fc919958b4a212a8342aaaa749)
2017-07-12ShellPkg/UefiHandleParsingLib: Fix memory leakRuiyu Ni
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> (cherry picked from commit 00324f3fce83b8d813ca3ec6b6eb663a88a8675e)
2017-07-12ShellPkg SmbiosView: Display Type 0 BIOS segment in hexadecimalJeff Westfahl
The SMBIOS Type 0 BIOS segment field is currently displayed in decimal. Since this field is likely to have a value like 0xE800 or 0xF000, using hexadecimal seems like a better choice. 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: Star Zeng <star.zeng@intel.com> (cherry picked from commit fed709deb444084594c2e11a1886819fa54afc00)
2017-07-12ShellPkg/pci: Fix VS2012 build failureRuiyu 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> Cc: Dandan Bi <dandan.bi@intel.com> (cherry picked from commit f1894fa294a17c17149c55ae21d4d85b2df3c1de)
2017-07-12ShellPkg/comp: Fix file tag name.Ruiyu Ni
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> (cherry picked from commit a32c1a5b1c0945a7159a42a28aafcde4011ad55d)
2017-07-12ShellPkg/Pci: Always dump the extended config space for PCIERuiyu Ni
It is to align to the original behavior before "-ec" option was added. The patch also refines the code to make it more readable. 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: Jim Dailey <Jim.Dailey@dell.com> (cherry picked from commit 33cc487c263384451aef77fa5d749fd4f3d78b7d)
2017-07-12ShellPkg/ConsistMapping: Remove unneeded memory reallocationRuiyu Ni
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Michael Turner <Michael.Turner@microsoft.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> (cherry picked from commit 17c3dc19395121486c6f1614dbc564f39763720a)
2017-04-27ShellPkg: Move to new locationGuo Mang
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Guo Mang <mang.guo@intel.com>