summaryrefslogtreecommitdiff
path: root/ShellPkg
AgeCommit message (Collapse)AuthorFilesLines
2016-11-16ShellPkg: #ifndef of header files should have postfix underscoreRuiyu Ni3-6/+6
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
2016-11-16ShellPkg/dmpstore: Support "-sfo"Ruiyu Ni2-61/+154
The patch adds the "-sfo" support to "dmpstore" command. When -l or -d is specified, -sfo is not supported. When the variable specified by name and GUID cannot be found, an error message is displayed; Otherwise, the SFO is displayed. E.g.: "dmpstore -guid GuidThatDoesntExist -sfo" produces output as: ShellCommand,"dmpstore" VariableInfo,"","GuidThatDoesntExist","","","" "dmpstore NameThatDoesntExist -guid GuidThatDoesntExist -sfo" produces output as: ShellCommand,"dmpstore" dmpstore: No matching variables found. Guid GuidThatDoesntExist, Name NameThatDoesntExist The difference between the above 2 cases is that former one only specifies the GUID, but the latter one specifies both name and GUID. Since not specifying GUID means to use GlobalVariableGuid, "dmpstore NameThatDoesntExist -sfo" produces the similar output as latter one. I personally prefer to always produce SFO output for both cases. But the above behavior is the discussion result between HPE engineers. 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> Reviewed-by: Tapan Shah <tapandshah@hpe.com>
2016-11-15ShellPkg: Fix typos in comments and variablesGary Lin8-18/+18
- funciton -> function - paramter -> parameter - supresses -> suppresses - Seperator -> Separator - permenant -> permanent Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Gary Lin <glin@suse.com>
2016-11-11ShellPkg/ShellCommandLib: Add missing EFIAPI for public library APIsRuiyu Ni2-1/+5
DumpHex() and CatSDumpHex() are public library APIs but don't have EFIAPI modifier. Add the missing EFIAPI. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
2016-11-10ShellPkg: Fix the coding style issueBi, Dandan1-2/+2
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
2016-11-07ShellPkg/Ping6: Add a note in help for TargetIphegdenag1-0/+2
'Ping6 TargetIp' is a valid command input but we bail out when TargetIp is a link local address because we would want the user to specify the NIC (via SourceIp) through which he/she would want to ping to TargetIp. This patch updates the help text to mention the same. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
2016-11-07ShellPkg/reset: Support "-fwui" flagChen A Chen2-5/+44
The patch adds "-fwui" support to reset command which is newly added to Shell 2.2 spec. 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>
2016-10-31ShellPkg: print only valid characters for file overwrite promptTapan Shah1-2/+7
When copy command prompts to overwrite an existing file, pressing backspace continuously removes everything including the shell prompt. So print only valid characters for file overwrite prompt. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Tapan Shah <tapandshah@hpe.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
2016-10-27ShellPkg/UefiShellLevel2CommandsLib: rebase to ARRAY_SIZE()Laszlo Ersek1-1/+1
Cc: Jaben Carsey <jaben.carsey@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2016-10-27ShellPkg/UefiDpLib: rebase to ARRAY_SIZE()Laszlo Ersek1-5/+5
Cc: Jaben Carsey <jaben.carsey@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2016-10-25ShellPkg: update ping to use timer service instead of timer arch protocol .Fu Siyuan3-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>
2016-10-24ShellPkg: handle '-t or -terse' and '-s' flags for 'ver' command properlyTapan Shah1-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>
2016-10-19ShellPkg: Update sources to include MdePkg protocol definitionsRuiyu Ni21-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>
2016-10-19ShellPkg: Update header files to reference MdePkg protocol definitionRuiyu Ni5-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>
2016-10-19MdePkg: Include Shell/ShellDynamicCommand/ShellParameters definitionsRuiyu Ni4-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>
2016-10-19ShellPkg: Move SHELL_FREE_NON_NULL from ShellBase.h to ShellLib.hRuiyu Ni3-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>
2016-10-18ShellPkg/Shell: fix CopyGuid() arg order in EfiShellGetGuidFromName()Laszlo Ersek1-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>
2016-10-12ShellPkg/UefiShellTftpCommandLib: Update TFTP help textThomas Palmer1-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>
2016-10-12ShellPkg:?cd \? command fails to go back to the root directory of a file systemTapan Shah1-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>
2016-10-09ShellPkg/UefiShellNetwork1CommandsLib: Remove unnecessary EFIAPIChen A Chen1-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>
2016-10-09ShellPkg/UefiShellLib: Remove unnecessary EFIAPIChen A Chen2-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>
2016-10-09ShellPkg/UefiShellCommandLib: Remove unnecessary EFIAPIChen A Chen2-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>
2016-10-09ShellPkg/UefiShellBcfgCommandLib: Remove unnecessary EFIAPIChen A Chen1-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>
2016-10-09ShellPkg/UefiShellParsingLib: Remove unnecessary EFIAPIChen A Chen1-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>
2016-10-09ShellPkg/UefiShellLevel3CommandsLib: Remove unnecessary EFIAPIChen A Chen4-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>
2016-10-09ShellPkg/UefiShellLevel2CommandsLib: Remove unnecessary EFIAPIChen A Chen12-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>
2016-10-09ShellPkg/UefiShellLevel1CommandsLib: Remove unnecessary EFIAPIChen A Chen4-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>
2016-10-09ShellPkg/UefiShellDriver1CommandsLib: Remove unnecessary EFIAPIChen A Chen11-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>
2016-10-09ShellPkg/UefiShellDebug1CommandsLib: Remove unnecessary EFIAPIChen A Chen34-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>
2016-10-09ShellPkg/Application: Remove unnecessary EFIAPIChen A Chen17-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>
2016-10-07ShellPkg: Fix erroneous Status returned by ShellOpenFileByName()Vladimir Olovyannikov1-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>
2016-10-05ShellPkg: Move UnicodeCollation2 Protcol locate out of UefiShellLib constructorTapan Shah1-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>
2016-10-03ShellPkg/Hexedit: Fix FreePool() ASSERT() when writing diskMichael Kinney1-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>
2016-10-03ShellPkg/Shell: Update CRC32 in the EFI System Table headerCinnamon Shia1-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>
2016-09-26ShellPkg: Enhance 'cls' command to change the background and foreground colorsTapan Shah2-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>
2016-09-23ShellPkg: Update help output for disconnect commandTapan Shah1-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>
2016-09-22ShellPkg: Remove current working dir path ".;" from 'path' variableTapan Shah1-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>
2016-09-22ShellPkg: Expand special output file to include "NULL" and case insensitiveTapan Shah5-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>
2016-09-22ShellPkg: Add Persistent Memory support in 'memmap' commandTapan Shah2-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>
2016-09-22ShellPkg: Add '-nc' flag support in 'disconnect' commandTapan Shah2-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>
2016-09-08ShellPkg/UefiHandleParsingLib: fix retval for empty child controller arrayLaszlo Ersek1-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>
2016-09-08ShellPkg/UefiHandleParsingLib: fix IN/OUT notation in child ctrlr parsingLaszlo Ersek2-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>
2016-09-08ShellPkg: pci -i -_e to print next capabilityAbdul Lateef Attar1-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>
2016-09-01ShellPkg: Fix the incorrect return status in function FindFiles()Dandan Bi1-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>
2016-09-01ShellPkg: Add the check of parameter number in "DrvCfg" commandDandan Bi1-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>
2016-09-01ShellPkg: Add check for "dump" parameter in "bcfg" commandDandan Bi2-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>
2016-08-25Revert "ShellPkg: Move FindFirstCharacter/GetNextParameter to ShellCommandLib"Ruiyu Ni6-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>
2016-08-25Revert "ShellPkg: Add Shell[Get|Set]RawCmdLine to ShellCommandLib"Ruiyu Ni2-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>
2016-08-25Revert "ShellPkg: Fix echo to support displaying special characters"Ruiyu Ni2-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>
2016-08-17ShellPkg/Ls: Handle the case when SearchString is NULLRuiyu Ni1-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>