summaryrefslogtreecommitdiffstats
path: root/ShellPkg
Commit message (Collapse)AuthorAgeFilesLines
* ShellPkg: update ping to use timer service instead of timer arch protocol .Fu Siyuan2016-10-253-70/+171
| | | | | | | | | | | The ping command uses PI CPU arch protocol to calculate the RTT time, which is not allowed to use in UEFI shell. This patch updates it to use the UEFI timer event and Stall service to estimate the system timer period. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Hegde, Nagaraj P <nagaraj-p.hegde@hpe.com>
* ShellPkg: handle '-t or -terse' and '-s' flags for 'ver' command properlyTapan Shah2016-10-241-9/+15
| | | | | | | | | '-t or -terse' and '-s' flags are multiple exclusive So when both flags are used together, command should report an 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>
* ShellPkg: Update sources to include MdePkg protocol definitionsRuiyu Ni2016-10-1921-58/+45
| | | | | | 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 header files to reference MdePkg protocol definitionRuiyu Ni2016-10-195-3/+82
| | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* MdePkg: Include Shell/ShellDynamicCommand/ShellParameters definitionsRuiyu Ni2016-10-194-1433/+0
| | | | | | | | | | | | | Move Shell/ShellDynamicCommand/ShellParameters definitions from ShellPkg to MdePkg. The following patches will rename the header file name. 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: Jiewen Yao <jiewen.yao@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com>
* ShellPkg: Move SHELL_FREE_NON_NULL from ShellBase.h to ShellLib.hRuiyu Ni2016-10-193-14/+14
| | | | | | | | | | | | | The more proper place for macro SHELL_FREE_NON_NULL is ShellLib.h instead of ShellBase.h. Modify Compress.c to resolve build failure due to this change. 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: Jiewen Yao <jiewen.yao@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com>
* ShellPkg/Shell: fix CopyGuid() arg order in EfiShellGetGuidFromName()Laszlo Ersek2016-10-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The destination GUID comes first; from "MdePkg/Include/Library/BaseMemoryLib.h": > GUID * > EFIAPI > CopyGuid ( > OUT GUID *DestinationGuid, > IN CONST GUID *SourceGuid > ); Here "NewGuid" is the GUID looked up by GetGuidFromStringName(), and "Guid" is where EfiShellGetGuidFromName() has to propagate that result to. Cc: Jaben Carsey <jaben.carsey@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Tim Lewis <tim.lewis@insyde.com> Reported-by: Tim Lewis <tim.lewis@insyde.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Tim Lewis <tim.lewis@insyde.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* ShellPkg/UefiShellTftpCommandLib: Update TFTP help textThomas Palmer2016-10-121-4/+4
| | | | | | | | Clear up some help text for the TFTP shell command 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:?cd \? command fails to go back to the root directory of a file systemTapan Shah2016-10-121-1/+11
| | | | | | | | | | | Allows cd command to go back to the root directory when 'cd \' executed in system. This change prevents last PathRemoveLastItem() call which truncates '\' from 'fs0:\' in desired root path which is required to set CWD to the root directory. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Tapan Shah <tapandshah@hpe.com> Reviewed-by: Jaben Carsey <Jaben.carsey@intel.com>
* ShellPkg/UefiShellNetwork1CommandsLib: Remove unnecessary EFIAPIChen A Chen2016-10-091-14/+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/UefiShellLib: Remove unnecessary EFIAPIChen A Chen2016-10-092-16/+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/UefiShellCommandLib: Remove unnecessary EFIAPIChen A Chen2016-10-092-9/+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/UefiShellBcfgCommandLib: Remove unnecessary EFIAPIChen A Chen2016-10-091-9/+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/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/UefiShellLevel3CommandsLib: Remove unnecessary EFIAPIChen A Chen2016-10-094-8/+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/UefiShellLevel2CommandsLib: Remove unnecessary EFIAPIChen A Chen2016-10-0912-53/+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/UefiShellLevel1CommandsLib: Remove unnecessary EFIAPIChen A Chen2016-10-094-14/+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/UefiShellDriver1CommandsLib: Remove unnecessary EFIAPIChen A Chen2016-10-0911-30/+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/UefiShellDebug1CommandsLib: Remove unnecessary EFIAPIChen A Chen2016-10-0934-241/+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/Application: Remove unnecessary EFIAPIChen A Chen2016-10-0917-158/+4
| | | | | | | 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: Fix erroneous Status returned by ShellOpenFileByName()Vladimir Olovyannikov2016-10-071-0/+3
| | | | | | | | | | | | | | | | | | | | In ShellOpenFileByName() the file is opened using gEfiShellProtocol->OpenFileByName(). It is supposed that if this call returns an EFI_ERROR, the function should return that error immediately. However, this return was missing, and if UnicodeCollationProtocol has not been located by this time, the Status gets overwritten with LocateProtocol() call result, which eventually erroneously returns EFI_SUCCESS to the Shell.c, and this leads to attempt to execute a non-existent startup script, which fails, and which in turn leads to Shell being unloaded with "Invalid parameter" error. This patch fixes the bug. Cc: Tapan Shah <tapandshah@hpe.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Vladimir Olovyannikov <vladimir.olovyannikov@broadcom.com> Reviewed-by: Tapan Shah <tapandshah@hpe.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* ShellPkg: Move UnicodeCollation2 Protcol locate out of UefiShellLib constructorTapan Shah2016-10-051-7/+9
| | | | | | | | | | | Move gEfiUnicodeCollation2ProtocolGuid protocol outside of UefiShellLib constructor function. Locate gEfiUnicodeCollation2ProtocolGuid protocol in ShellOpenFileByName() which consumes this protocol API. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Tapan Shah <tapandshah@hpe.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* ShellPkg/Hexedit: Fix FreePool() ASSERT() when writing diskMichael Kinney2016-10-031-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | The HDiskImageSave() function copies a device path using DuplicateDevicePath() and passes that device path to gBS->LocateDevicePath() that changes the value of the device path pointer. When FreePool() is called with the modified device path pointer, the FreePool() service generates an ASSERT() because the signature for the pool head can not be found. The function HDiskImageRead() immediately above HDiskImageSave() has the correct algorithm that uses an additional local variable called DupDevicePathForFree to preserve the pointer to the allocated buffer so it can be used in the call to FreePool(). Bug: <https://bugzilla.tianocore.org/show_bug.cgi?id=131> 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 Kinney <michael.d.kinney@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jaben Carsey <Jaben.carsey@intel.com>
* ShellPkg/Shell: Update CRC32 in the EFI System Table headerCinnamon Shia2016-10-031-0/+20
| | | | | | | | | | Update CRC32 in the EFI System Table header after shell changes the value of gST->ConsoleOutHandle and gST->ConOut Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Cinnamon Shia <cinnamon.shia@hpe.com> Reviewed-By: Tapan Shah <tapandshah@hpe.com> Reviewed-By: Jaben Carsey <Jaben.carsey@intel.com>
* ShellPkg: Enhance 'cls' command to change the background and foreground colorsTapan Shah2016-09-262-57/+179
| | | | | | | | | | | As per ECR 1416 change in UEFI Shell Specification 2.2, enhancing 'cls' command to change the background color as well as foreground color. Also add support to display current settings using 'cls -sfo' command. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Tapan Shah <tapandshah@hpe.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* ShellPkg: Update help output for disconnect commandTapan Shah2016-09-231-6/+7
| | | | | | | | | | | Minor changes to match help output notes for disconnect command with UEFI Shell 2.2 specification document. Few other formatting changes to fit the help output in 80x25 screen size. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Tapan Shah <tapandshah@hpe.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* ShellPkg: Remove current working dir path ".;" from 'path' variableTapan Shah2016-09-221-3/+1
| | | | | | | | | | As per ECR 1349, latest UEFI Shell 2.2 specification has removed current working directory path ".;" from a default 'path' environment variable as current working directory always search first in system. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Tapan Shah <tapandshah@hpe.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* ShellPkg: Expand special output file to include "NULL" and case insensitiveTapan Shah2016-09-225-4/+23
| | | | | | | | | | | | As per ECR 1349 change in UEFI Shell Specification 2.2, expanding a special output file name to include "NULL". Previously it only supported "NUL" as a special output file and it was case sensitive. With this change both "NUL" and "NULL" are special output file and checked as case insensitive. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Tapan Shah <tapandshah@hpe.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* ShellPkg: Add Persistent Memory support in 'memmap' commandTapan Shah2016-09-222-4/+12
| | | | | | | | | As per ECR 1416, latest UEFI Shell 2.2 Specification has added Persistent Memory support in 'memmap' command. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Tapan Shah <tapandshah@hpe.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* ShellPkg: Add '-nc' flag support in 'disconnect' commandTapan Shah2016-09-222-4/+28
| | | | | | | | | | | | As per ECR 1416, latest UEFI Shell 2.2 specification: Define a behavior where 'disconnect -r' will disconnect drivers from all devices but it will reconnect all consoles. If -nc flag is used (e.g. 'disconnect -r -nc') then disconnect drivers from all devices and don't reconnect consoles. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Tapan Shah <tapandshah@hpe.com> Reviewed-by: Jaben Carsey <jaben.carsey@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-082-4/+4
| | | | | | | | | | | | | "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: pci -i -_e to print next capabilityAbdul Lateef Attar2016-09-081-2/+2
| | | | | | | | | | | | | | According to PCI spec the next AER capability is relative to the beginning of PCI configuration space. Hence substract the base offset to get the next capability. "-_e" option is changed from TypeFlag to TypeValue, so that user can specify individual AER capability to print. e.g. pci 00 00 01 -i -_e <capability-id> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Abdul Lateef Attar <abdul-lateef.attar@hpe.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* ShellPkg: Fix the incorrect return status in function FindFiles()Dandan Bi2016-09-011-0/+4
| | | | | | | | | | | | | According to the latest shell spec, in function FindFiles(), when no files were found, it should return EFI_NOT_FOUND. But current codes don't follow the spec. This patch is to fix this issue. 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: Ruiyu Ni <ruiyu.ni@intel.com>
* ShellPkg: Add the check of parameter number in "DrvCfg" commandDandan Bi2016-09-011-0/+5
| | | | | | | | | | | | | | In shell spec, the usage of "Drvcfg" command is: drvcfg [-l XXX] [-c] [-f <Type>|-v|-s] [DriverHandle [DeviceHandle [ChildHandle]]] [-i filename] [-o filename]. The parameter number(doesn't include the flags) cannot exceed 4, now we add this point to check whether using the command correctly. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Tapan Shah <tapandshah@hpe.com>
* ShellPkg: Add check for "dump" parameter in "bcfg" commandDandan Bi2016-09-012-1/+6
| | | | | | | | | | | | | When user uses the command "bcfg driver|boot [dump [-v]]", the number of command line value parameters (doesn't include the flag) must be three. We can add this point to check whether using this command correctly. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Tapan Shah <tapandshah@hpe.com>
* Revert "ShellPkg: Move FindFirstCharacter/GetNextParameter to ShellCommandLib"Ruiyu Ni2016-08-256-260/+258
| | | | | | | | | | | | | | | This reverts commit c0bcd3433f33876c519bf5567e0ab69261b57fe9. The above commit causes several regression of "echo" command: 1. Double quotes are not being stripped from the final text. UEFI Shell 2.2 section 3.4.5 chops out the quotes. 2. Output redirection is not working as expected. Text is being redirected, but the ‘> …’ text should not be. 3. Inconsistent special character handling. For example, comments with # seem to be parsed out correctly, but handing of ^ is incorrect. In summary, ‘echo “You are ^#1” > t.txt’ results in the below content in t.txt: “You are ^#1” > t.txt 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>
* Revert "ShellPkg: Add Shell[Get|Set]RawCmdLine to ShellCommandLib"Ruiyu Ni2016-08-252-68/+0
| | | | | | | | | | | | | | | This reverts commit 0fcf8d4df85d861b6e721bd1d8abb449f05e15ed. The above commit causes several regression of "echo" command: 1. Double quotes are not being stripped from the final text. UEFI Shell 2.2 section 3.4.5 chops out the quotes. 2. Output redirection is not working as expected. Text is being redirected, but the ‘> …’ text should not be. 3. Inconsistent special character handling. For example, comments with # seem to be parsed out correctly, but handing of ^ is incorrect. In summary, ‘echo “You are ^#1” > t.txt’ results in the below content in t.txt: “You are ^#1” > t.txt 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>
* Revert "ShellPkg: Fix echo to support displaying special characters"Ruiyu Ni2016-08-252-63/+81
| | | | | | | | | | | | | | | This reverts commit 95fc5a877502a6e6324300eed0136243d359fa96. The above commit causes several regression of "echo" command: 1. Double quotes are not being stripped from the final text. UEFI Shell 2.2 section 3.4.5 chops out the quotes. 2. Output redirection is not working as expected. Text is being redirected, but the ‘> …’ text should not be. 3. Inconsistent special character handling. For example, comments with # seem to be parsed out correctly, but handing of ^ is incorrect. In summary, ‘echo “You are ^#1” > t.txt’ results in the below content in t.txt: “You are ^#1” > t.txt 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>
* ShellPkg/Ls: Handle the case when SearchString is NULLRuiyu Ni2016-08-171-0/+5
| | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com>
* ShellPkg-UefiShellCommandLib: Add EFIAPI in VA_List library functionShi, Steven2016-08-101-0/+1
| | | | | | | | | | Add EFIAPI in CatPrint library function. Every function which uses variable list need explicit use EFIAPI to force use MS ABI. This change is needed to pass CLANG38 build. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Steven Shi <steven.shi@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* ShellPkg-UefiShellTftpCommandLib: Replace compiler builtinShi, Steven2016-08-101-1/+1
| | | | | | | | | Use explicit CopyMem to replace compiler builtin to do the structure values assignment. This change is needed to pass CLANG38 build. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Steven Shi <steven.shi@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* ShellPkg/ls: Display the correct directory pathRuiyu Ni2016-08-101-0/+1
| | | | | | | 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: Tapan Shah <tapandshah@hpe.com>
* ShellPkg/ls: Fix to support "ls fs0:File.txt"Ruiyu Ni2016-08-101-5/+4
| | | | | | | | | | | | “ls fs0:\File.txt" can list the file correctly but when the backslash is removed from colon, the file cannot be listed. The patch fixes this issue. 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: Tapan Shah <tapandshah@hpe.com>
* ShellPkg: Fix FindFiles() to handle "fsx:EFI\BOOT" pathRuiyu Ni2016-08-101-7/+6
| | | | | | | | | | | When the FilePattern is similar to "fsx:EFI\BOOT", FindFiles() cannot handle it correctly because it always assumes there is "\\" after "fsx:". 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: Tapan Shah <tapandshah@hpe.com>
* ShellPkg: TAB logic incorrectly shows files in CWD when typing \<TAB>Ruiyu Ni2016-08-101-2/+13
| | | | | | | | | It should shows files in root directory of current map. 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: Tapan Shah <tapandshah@hpe.com>
* ShellPkg: TAB logic incorrectly chops out fs0: when typing fs0:<TAB>Ruiyu Ni2016-08-101-127/+185
| | | | | | | 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: Tapan Shah <tapandshah@hpe.com>
* ShellPkg SmbiosView: Show "SocketDesignation" instead of "Socket" for Type 4Star Zeng2016-08-081-2/+2
| | | | | | | | | | | | It is to make the info shown more aligned with SMBIOS spec. Cc: Amy Chan <amy.chan@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: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Amy Chan <amy.chan@intel.com>
* ShellPkg DSC: Add build option to disable deprecated APIsHao Wu2016-08-081-0/+2
| | | | | | | | | | | | | | Add the following definition in the [BuildOptions] section in package DSC files to disable APIs that are deprecated: [BuildOptions] *_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES Cc: Jaben Carsey <jaben.carsey@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> 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>
* ShellPkg: Unregister hotkey callback when exiting ShellRuiyu Ni2016-07-291-1/+1
| | | | | | | | | | | | | | | | | | | Commit 9168df3dea65f707d1e9c32eba5e18ef6b84e5cd "ShellPkg/ShellProtocol.c: Handle memory allocation failure" only keeps the protocol clean up in CleanUpShellProtocol() and creates a new function CleanUpShellEnvironment() which calls CleanUpShellProtocol(), then unregisters the hotkey callback. But the commit forgot to change the Shell.c to call CleanUpShellEnvironment() which causes the hotkey callback is not unregistered while the callback function doesn't exist when Shell exits. This causes system hang when pressing CTRL+C after exiting shell. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com>