summaryrefslogtreecommitdiff
path: root/ShellPkg
AgeCommit message (Collapse)Author
2016-01-07ShellPkg: Clean-up 'map' command error message handlingTapan Shah
Refactor 'map' command error handling code and add standard error message Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Tapan Shah <tapandshah@hpe.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19616 6f19259b-4bc3-4df7-8a09-765794883524
2016-01-06Revert "ShellPkg : Add UEFI_APPLICATION module type to ↵Laszlo Ersek
UefiShellInstall1CommandsLib.inf" SVN r19585 broke the OVMF build: > ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.inf(20): > error 3001: MODULE_TYPE UEFI_DRIVER UEFI_APPLICATION is not supported > for EDK II, valid values are: > BASE SEC PEI_CORE PEIM DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER > DXE_SAL_DRIVER DXE_SMM_DRIVER UEFI_DRIVER UEFI_APPLICATION USER_DEFINED > SMM_CORE Revert the patch. Reported-by: Laszlo Ersek <lersek@redhat.com> Suggested-by: "El-Haj-Mahmoud, Samer" <samer.el-haj-mahmoud@hpe.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19610 6f19259b-4bc3-4df7-8a09-765794883524
2016-01-06ShellPkg: Make 'alias' can display a single alias name.Qiu Shumin
When we run command "alias cat" Shell print out "alias: Too few arguments". This patch makes value of single alias name can be displayed. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19608 6f19259b-4bc3-4df7-8a09-765794883524
2016-01-06ShellPkg: Fix Shell assert when mv a file to a NULL target.Qiu Shumin
When run command 'mv file ' the Shell assert. The patch refined the length of the buffer to fix this bug. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19607 6f19259b-4bc3-4df7-8a09-765794883524
2016-01-05ShellPkg : Add UEFI_APPLICATION module type to UefiShellInstall1CommandsLib.infSamer El-Haj-Mahmoud
Using UEFI_APPLICATION for all Shell app and libraries allows the use of different compiler flags for the Shell application itself and for other applications that are built separately that use Shell libraries. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <elhaj@hpe.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19585 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-25ShellPkg: Fix memory leak in function 'EfiShellSetCurDir' and 'EfiShellSetMap'.Yao Jiewen
Cc: Ruiyu Ni <ruiyu.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yao Jiewen <Jiewen.Yao@intel.com> Reviewed-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19529 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-25ShellPkg: Fix memory leak in function'ShellCommandConsistMappingInitialize'.Yao Jiewen
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yao Jiewen <Jiewen.Yao@intel.com> Reviewed-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19528 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-25ShellPkg: Fix memory leak in function ↵Yao Jiewen
'ShellCommandCreateInitialMappingsAndPaths'. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yao Jiewen <Jiewen.Yao@intel.com> Reviewed-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19527 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-25ShellPkg: Fix memory leak in function'ShellCommandRunHelp'.Yao Jiewen
When run help command Shell may have memory leak. This patch fix this bug. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yao Jiewen <Jiewen.Yao@intel.com> Reviewed-by: Qiu Shumin <shumin.qiu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19526 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-25Subject: [PATCH 5/9] ShellPkg: Fix memory leak in ↵Qiu Shumin
function'ManBufferFindSections'. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: Yao Jiewen <Jiewen.Yao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19525 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-25ShellPkg: Fix memory leak in 'ShellOpenFileByName'.Yao Jiewen
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yao Jiewen <Jiewen.Yao@intel.com> Reviewed-by: Qiu Shumin <shumin.qiu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19524 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-24ShellPkg: Fix memory leak in 'InternalShellExecuteDevicePath'.Yao Jiewen
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yao Jiewen <Jiewen.Yao@intel.com> Reviewed-by: Qiu Shumin <shumin.qiu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19523 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-24ShellPkg: Fix the TAB-auto-completion memory leak.Qiu Shumin
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19522 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-24ShellPkg: Fix memory leak when running Shell script.Qiu Shumin
When we run following script in Shell: " for %a run (1 200) echo %a memmap endfor " We may find memory leak in system. This patch free buffer in 'BufferToFreeList' to avoid this issue. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19521 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-24ShellPkg: Refine the code logic of 'command history'.Qiu Shumin
Add the PCD to PcdShellMaxHistoryCommandCount indicate the max count of history commands. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19520 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-23ShellPkg: Fix memory leak in ShellProtocol.Qiu Shumin
1. Close unused file handle. 2. Free the local allocated buffer function returned. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19481 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-23ShellPkg: Fix memory leak in SimpleTextOutput on file.Qiu Shumin
Free 'SimpleTextOut->Mode' buffer before 'SimpleTextOut' is free. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19480 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-22ShellPkg: Add AIP IPv6 UNDI support to Shell dhSamer El-Haj-Mahmoud
Update Shell DH command to decode and print the value of gEfiAdapterInfoUndiIpv6SupportGuid AIP instance. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <elhaj@hpe.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19437 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-21ShellPkg: Refine the code format.Qiu Shumin
1. Add function header comment. 2. Non-Boolean comparisons should explicitly use a compare operator. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19424 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-16ShellPkg: Fix unhandled value in switch statementPaulo Alcantara
This patch fixes the following compile error under GCC 5.3.1: /home/pcacjr/work/edk2.git/ShellPkg/Application/Shell/ShellManParser.c: In function 'IsTitleHeader': /home/pcacjr/work/edk2.git/ShellPkg/Application/Shell/ShellManParser.c:502:5: error: enumeration value 'Final' not handled in switch [-Werror=switch] switch (State) { ^ Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Paulo Alcantara <paulo.alc.cavalcanti@hp.com> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19304 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-16ShellPkg: Fix the 'bcfg' command ASSERT when use some invalid parameters.Qiu Shumin
'bcfg boot mv xx yy' command will ASSET when xx is larger than the count of boot options. This patch correct the order of ShellPrintHiiEx parameters to fix the bugs. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19295 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-16ShellPkg: Use %p for smbiosview SMBIOS table addresses.Samer El-Haj-Mahmoud
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <elhaj@hpe.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19293 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-16ShellPkg: Fix a bug in smbiosview PowerSupply Characteristics.Samer El-Haj-Mahmoud
Fix bit shifting when isolating the Characteristics of Power Supply information. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <elhaj@hpe.com> Reviewed-by: Qiu Shumin <shumin.qiu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19291 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-16ShellPkg: Ease the shell's MAN file Title Header syntax requirements.Jim Dailey
Prior to this change, the shell would not use a MAN file if the Title Header line was not strictly formatted. For example, if the case of the command name in the file was not exactly the same as the case of the command name as typed by the user, the MAN file would not be used. Also, extra whitespace on the line would also cause the shell to ignore the MAN file. This change allows "extra" white space and ignores case when looking for the command name. It also ignores any path information for cases where the user enters a relative or absolute path to the EFI file. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jim Dailey <jim_dailey@dell.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19290 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-14ShellPkg/Mm: Fix build warningsMichael Kinney
Fix build warnings for potentially uninitialized local variables in the functions ShellMmLocateIoProtocol() and ShellCommandRunMm() in the Shell implementation of the 'mm' command. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19233 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-13ShellPkg: Initialize the local pointer to avoid potential suspicious ↵Qiu Shumin
dereference. 1. Initialize the local pointer 'HandleBuffer'. 2. When 'LocateHandleBuffer' return error 'HandleBuffer' is expected unchanged, add code make sure this. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19229 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-12ShellPkg/Shell - Fix ASSERT() when FvSimpleFileSystemDxe is usedMichael Kinney
When the FvSimpleFileSystemDxe module is included in a platform, Simple File System Protocols are produced for firmware volumes(FV) that do not have the same style device paths as file systems with file names. The ShellPkg has an assumption that the device path contains device path nodes of type MEDIA_FILEPATH_DP and generates an ASSERT() if any other device path nodes are encountered. This change removes the ASSERT() condition and instead returns NULL that means EfiShellGetFilePathFromDevicePath() can not convert the device path nodes that represent the file path to a Unicode string. Cc: Jaben Carsey <jaben.carsey@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19228 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-10ShellPkg: Fix ifconfig hang issue with incomplete parametersJiaxin Wu
This patch is used to fix ifconfig hang issue with incomplete parameters. In addition, some error related output information is added to increase the interactivity. Cc: Leekha Shaveta <shaveta@freescale.com> Cc: Carsey Jaben <jaben.carsey@intel.com> Cc: Ye Ting <ting.ye@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> Tested-by: Leekha Shaveta <shaveta@freescale.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19212 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-10ShellPkg/mm: Fix mm to support multiple root bridge platformRuiyu Ni
In multiple root bridge platforms, different root bridges may share the same segment but occupy different range of buses, or may occupy different segments. The fix is to find the correct root bridge IO instance by comparing not only the segment but also the bus ranges. It tries to access the MMIO and IO in the following order: PciRootBridgeIo, CpuIo and direct IO. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19181 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-10ShellPkg/mm: Fix the help message to align to implementation and specRuiyu Ni
The implementation is already aligned to 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> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19180 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-09ShellPkg: Make 'dh' support showing all spec defined protocols.Jaben Carsey
When using 'dh' to dump all protocols installed on a handle, some of them are shown as 'UnknownDevice'. Device patch make 'dh' support all spec defined protocols. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Samer El-Haj-Mahmoud <samer.el-haj-mahmoud@hpe.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19177 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-09ShellPkg: Convert all .uni files to utf-8Jordan Justen
To convert these files I ran: $ python3 BaseTools/Scripts/ConvertUni.py ShellPkg Cc: Jaben Carsey <jaben.carsey@intel.com> Cc: Shumin Qiu <shumin.qiu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19176 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-08ShellPkg: Refine the code to reduce time cost of 'map -r'Qiu Shumin
In some platform 'map -r' may cost more than 1 min. This patch filter the target handles by BlockIO and SimpleFileSystem protocol to reduce the time cost. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19149 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-04ShellPkg: Fix wrong return status for Ifconfig.cJiaxin Wu
The Ifconfig command handler tries to return an EFI_STATUS when the return type should be SHELL_STATUS. Cc: Cohen Eugene <eugene@hp.com> Cc: Carsey Jaben <jaben.carsey@intel.com> Cc: Ye Ting <ting.ye@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19110 6f19259b-4bc3-4df7-8a09-765794883524
2015-11-26ShellPkg: Add NULL check to pointer returned from 'AllocateZeroPool'.Qiu Shumin
When CustomCumulativeToken is not NULL, the CustomCumulativeData is expected non-NULL. Add 'ASSERT' statement to ensure this. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18956 6f19259b-4bc3-4df7-8a09-765794883524
2015-11-26ShellPkg: fix RVCT warning due to CONST in typecast.Cohen Eugene
Building the latest shell on RVCT exposed this warning: ShellPkg\Application\Shell\Shell.c(1090,69): error #191-D: type qualifier is meaningless on cast type The CONST in the cast was deemed meaningless. Removing the CONST fixed the warning. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Cohen Eugene <eugene@hp.com> Reviewed-by: Qiu Shumin <shumin.qiu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18954 6f19259b-4bc3-4df7-8a09-765794883524
2015-11-19ShellPkg: Corrected CatSPrint usage to prevent memory leaks.Cecil Sheng
CatSPrint allocates return buffer for the caller. The caller doesn't have to allocate one, and has to free the used buffers. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Cecil Sheng <cecil.sheng@hpe.com> Reviewed-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18902 6f19259b-4bc3-4df7-8a09-765794883524
2015-11-09ShellPkg: Don't strip positional parameters of quotation marks.Qiu Shumin
Per Shell SPEC 2.1 'Double-quotation marks that surround arguments are not stripped in positional parameters'. This patch makes Shell implementation to follow SPEC. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18742 6f19259b-4bc3-4df7-8a09-765794883524
2015-11-05ShellPkg/UefiDpLib: Support dumping cumulative dataCinnamon Shia
Add a new option -c to dump cumulative data. For example: shell> dp -c ==[ Cumulative ]======== (Times in microsec.) Cumulative Average Shortest Longest Name Count Duration Duration Duration Duration LoadImage: 200 1000000 7000 0 100000 StartImage: 200 20000000 90000 0 7000000 DB:Start: 200 20000000 100000 0 9000000 DB:Support: 200000 100000 0 0 7000 shell> dp -c DXE ==[ Cumulative ]======== (Times in microsec.) Cumulative Average Shortest Longest Name Count Duration Duration Duration Duration LoadImage: 200 1000000 7000 0 100000 StartImage: 200 20000000 90000 0 7000000 DB:Start: 200 20000000 100000 0 9000000 DB:Support: 200000 100000 0 0 7000 DXE 1 30000000 30000000 0 30000000 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Cinnamon Shia <cinnamon.shia@hpe.com> Reviewed-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: El-Haj-Mahmoud Samer <samer.el-haj-mahmoud@hpe.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18728 6f19259b-4bc3-4df7-8a09-765794883524
2015-11-05ShellPkg/UefiDpLib: Fix a DP cumulative data issueCinnamon Shia
The value of PERF_CUM_DATA.Count and PERF_CUM_DATA.Duration field keep cumulating on every execution of dp. Initialize the CumData at dp's entry point. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Cinnamon Shia <cinnamon.shia@hpe.com> Reviewed-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18727 6f19259b-4bc3-4df7-8a09-765794883524
2015-11-04ShellPkg UefiDpLib: Use correct string length for the input UnicodeBufferStar Zeng
Same as the beginning of function to use DP_GAUGE_STRING_LENGTH, but not DXE_PERFORMANCE_STRING_LENGTH. 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> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18725 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-28ShellPkg: Refine code by initializing local variable and adding ASSERT ↵Qiu Shumin
statement. Add ASSERT statement and initialize local variable to make code more readable. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18689 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-26ShellPkg: Fix 'EfiShellExecute' doesn't get command status correctly.Qiu Shumin
1. Add a new function 'RunShellCommand' to return command status, thus 'EfiShellExecute' can get the command return status of 'CommandLine'. 2. Refine the code logic of 'EfiShellExecute' to make the new image of shell be loaded only if 'Environment' isn't NULL. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qiu Shumin <shumin.qiu@intel.com> Signed-off-by: Jin Eric <eric.jin@intel.com> Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18664 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-23ShellPkg: Update 'tftp' command help output and error messagesTapan Shah
Changing 'tftp' command's help output .uni file to match other EDK2 Shell commands as well as adjusting error messages text. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Tapan Shah <tapandshah@hpe.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18659 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-23ShellPkg: Follow spec to remove the last '\' char in return name of GetCurDir().Qiu Shumin
In Shell spec 2.1 the return name of EFI_SHELL_PROTOCOL.GetCurDir() is defined as 'fs0:\current-dir' while in current implementation it's 'fs0:\current-dir\'. To follow spec the patch removed the redundant '\' char. Since it has been broken for a long time, some codes may depend on the broken behavior. After this change 'EFI_SHELL_PROTOCOL.GetCurDir()' and 'UefiShellLib.ShellGetCurrentDir()' will return a current directory string without tailing '\' (fs0:\current-dir), the value of Shell environment variable 'cwd' will become 'fs0:\current-dir' as well. This patch has updated all the code in EDKII to make them depend on the new behavior. Developers should check whether 'GetCurDir()' and 'ShellGetCurrentDir' are used in their source code. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18653 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-15ShellPkg: Fix ASCII input redirection does not work correctly.Qiu Shumin
When executing 'ls -b <a arg.txt' Shell cannot get the ASCII char in 'arg.txt' correctly. This patch updates the file read buffer size when read from ASCII file to fix the bug. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qiu Shumin <shumin.qiu@intel.com> Signed-off-by: Felix Poludov <Felixp@ami.com> Signed-off-by: Oleksiy Yakovlev <Oleksiyy@ami.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18609 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-15ShellPkg: Use safe string functions to refine 'Tftp.c' code.Qiu Shumin
Safe string functions can help avoid potential buffer overflow. This patch replaces the StrCpy with StCpyS. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18608 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-10ShellPkg: Print error message when Shell set environment variable fail.Qiu Shumin
If you try to 'set' a read only environment variable and it fails without printing any information. This patch add error message printing when 'set' environment variable fails. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18598 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-29ShellPkg: Add a simple case to test shell parameter parsing logicRuiyu Ni
TestArgv.nsh is a very simple shell script to test how the interpreter parses the parameters. It uses ShellCTestApp.efi to dump the parameters passed from the interpreter. TestArgv.log is the desired output created using "TestArgv.nsh > TestArgv.log". Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18558 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-28ShellPkg: Build all libraries unconditionally.Qiu Shumin
Build all the optional libraries unconditionally so we can catch changes and how they affect the package regardless of the NO_SHELL_PROFILES, INCLUDE_DP, and INCLUDE_TFTP_COMMAND settings. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qiu Shumin <shumin.qiu@intel.com> Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18557 6f19259b-4bc3-4df7-8a09-765794883524