Commit Graph

706 Commits

Author SHA1 Message Date
hegdenag 521981ee76 ShellPkg/Ifconfig6: Address ASSERT because of a missing NULL check
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>
2017-01-13 09:40:48 +08:00
Linson Augustine e9f0be021b ShellPkg/SmbiosView: Add decoding of SMBIOS record type 43
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>
2017-01-13 09:15:57 +08:00
Chris Phillips 12233c1917 ShellPkg: Update smbiosview command to display Type 3 values
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>
2017-01-12 16:46:36 +08:00
Ruiyu Ni 7c14bc8769 ShellPkg/HandleParsingLib: Fix build failure due to missing semicolon
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
2017-01-11 13:14:40 +08:00
Ruiyu Ni de8cea6f3c ShellPkg/dh: Support dump from GUID and "decode" parameter
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>
2017-01-11 10:07:08 +08:00
Chen A Chen 28f898f856 ShellPkg/Dh: Fix coding style issues
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>
2017-01-11 10:07:07 +08:00
Chen A Chen 0976f90821 ShellPkg/HandleParsingLib: Add new API GetAllMappingGuids
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>
2017-01-11 10:07:07 +08:00
Ruiyu Ni 0e88348e4b ShellPkg/HandleParsingLib: Return NULL name for unknown GUID
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>
2017-01-11 10:07:06 +08:00
Ruiyu Ni d4ec9a5725 ShellPkg/HandleParsingLib: Rename global variables
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
2017-01-11 10:07:06 +08:00
Ruiyu Ni d9bb3ca3c2 ShellPkg/cd: Fix "cd" to support "fs0:dir" (no slash after ':')
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>
2016-12-29 09:35:14 +08:00
Ruiyu Ni 7dede0a219 ShellPkg/setvar: Correct typo in setvar help message
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-12-16 09:32:28 +08:00
Dandan Bi 150d35eb16 ShellPkg/UefiShellNetwork2CommandsLib: Fix incorrect Protocol format
Cc: Fu Siyuan <siyuan.fu@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>
2016-12-14 21:34:34 +08:00
Dandan Bi de9005e55f ShellPkg/UefiShellNetwork1CommandsLib: Fix incorrect Protocol format
Cc: Fu Siyuan <siyuan.fu@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>
2016-12-14 21:34:33 +08:00
Dandan Bi ff28c72b45 ShellPkg/UefiShellDebug1CommandsLib: Fix coding style issues
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>
2016-12-14 21:34:32 +08:00
Gary Lin 69f6787b0d ShellPkg: Assign the correct value to ShellStatus
Since the type of ShellStatus is SHELL_STATUS, we should use
SHELL_INVALID_PARAMETER instead of EFI_INVALID_PARAMETER.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gary Lin <glin@suse.com>
Cc: Zhang Lubo <lubo.zhang@intel.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Zhang Lubo <lubo.zhang@intel.com>
Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
2016-12-09 10:10:39 +08:00
Tapan Shah 528d74e615 ShellPkg: Add missing header line for SFO flag in 'cls' command
Adding a missing header line for '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-12-09 09:32:51 +08:00
Zhang Lubo 445d200762 ShellPkg: Add error prompt message in Ifconfig6 command.
v2: update the prompt message more readable.

It should display error prompt message when Ifconfig6 can
not configure correctly.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zhang Lubo <lubo.zhang@intel.com>
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: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
2016-12-06 18:37:50 +08:00
Chen A Chen 0db4acb61a ShellPkg/MV: Fix MV to deny moving parent of current directory
When user types "mv -r fs0:\A\ fs1:\" under directory
"fs0:\A\B\", MV command should deny such movement.

The patch fixes the above issue.
It also denies moving current directory.

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-12-05 09:18:32 +08:00
Zhang Lubo 825f09b762 ShellPkg: update ping6 to use timer service instead of timer arch protocol .
This patch update the shell ping command to use timer service to calculate the
RTT time, instead of using the timer arch protocol.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zhang Lubo <lubo.zhang@intel.com>
Cc: Ni Ruiyu <ruiyu.ni@intel.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
2016-11-23 14:01:32 +08:00
Ruiyu Ni e9597b4519 ShellPkg/dmpstore: Support "-sfo"
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-16 12:32:17 +08:00
Gary Lin 268d344557 ShellPkg: Fix typos in comments and variables
- 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-15 11:05:34 +08:00
Ruiyu Ni 667d714650 ShellPkg/ShellCommandLib: Add missing EFIAPI for public library APIs
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-11 10:59:39 +08:00
hegdenag d66f85cb5e ShellPkg/Ping6: Add a note in help for TargetIp
'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-07 10:21:59 -08:00
Chen A Chen f675a1b422 ShellPkg/reset: Support "-fwui" flag
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-11-07 10:43:27 +08:00
Tapan Shah ac55b92554 ShellPkg: print only valid characters for file overwrite prompt
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-31 08:21:05 -07:00
Laszlo Ersek fe6c62fc0c ShellPkg/UefiShellLevel2CommandsLib: rebase to ARRAY_SIZE()
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-27 11:15:20 +02:00
Laszlo Ersek cb4669e051 ShellPkg/UefiDpLib: rebase to ARRAY_SIZE()
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-27 11:15:20 +02:00
Fu Siyuan 2a3263303b ShellPkg: update ping to use timer service instead of timer arch protocol .
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-25 15:16:43 +08:00
Tapan Shah 9d54bf4e7e ShellPkg: handle '-t or -terse' and '-s' flags for 'ver' command properly
'-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-24 10:27:08 -07:00
Ruiyu Ni 28165f245f ShellPkg: Update sources to include MdePkg protocol definitions
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-19 10:26:16 +08:00
Ruiyu Ni c6377bfacc ShellPkg: Move SHELL_FREE_NON_NULL from ShellBase.h to ShellLib.h
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-19 10:24:36 +08:00
Thomas Palmer 75351daf3e ShellPkg/UefiShellTftpCommandLib: Update TFTP help text
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-12 14:08:20 -07:00
Tapan Shah a7ea752e59 ShellPkg:?cd \? command fails to go back to the root directory of a file system
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-12 10:24:35 -07:00
Chen A Chen 8f3ecc5e53 ShellPkg/UefiShellNetwork1CommandsLib: Remove unnecessary EFIAPI
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-09 10:27:51 +08:00
Chen A Chen 8e6b1be77a ShellPkg/UefiShellLib: Remove unnecessary EFIAPI
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-09 10:27:51 +08:00
Chen A Chen 398faa1c1d ShellPkg/UefiShellCommandLib: Remove unnecessary EFIAPI
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-09 10:27:50 +08:00
Chen A Chen 8fc1d11c71 ShellPkg/UefiShellBcfgCommandLib: Remove unnecessary EFIAPI
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-09 10:27:50 +08:00
Chen A Chen a9e05b9fc8 ShellPkg/UefiShellParsingLib: Remove unnecessary EFIAPI
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-09 10:27:50 +08:00
Chen A Chen 23a4329cb0 ShellPkg/UefiShellLevel3CommandsLib: Remove unnecessary EFIAPI
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-09 10:27:49 +08:00
Chen A Chen 1c5cc5e5f7 ShellPkg/UefiShellLevel2CommandsLib: Remove unnecessary EFIAPI
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-09 10:27:49 +08:00
Chen A Chen 3be79f1b44 ShellPkg/UefiShellLevel1CommandsLib: Remove unnecessary EFIAPI
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-09 10:27:48 +08:00
Chen A Chen 4640a5df41 ShellPkg/UefiShellDriver1CommandsLib: Remove unnecessary EFIAPI
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-09 10:27:48 +08:00
Chen A Chen c4e74e9b81 ShellPkg/UefiShellDebug1CommandsLib: Remove unnecessary EFIAPI
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-09 10:27:47 +08:00
Vladimir Olovyannikov f9c3b1b534 ShellPkg: Fix erroneous Status returned by ShellOpenFileByName()
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-07 10:35:40 -07:00
Tapan Shah 2cf9ecd226 ShellPkg: Move UnicodeCollation2 Protcol locate out of UefiShellLib constructor
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-05 15:19:40 -07:00
Michael Kinney c0b7e2b2bf ShellPkg/Hexedit: Fix FreePool() ASSERT() when writing disk
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-03 15:05:40 -07:00
Tapan Shah 7188b4557a ShellPkg: Enhance 'cls' command to change the background and foreground colors
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-26 13:10:31 -07:00
Tapan Shah ea317c0658 ShellPkg: Update help output for disconnect command
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-23 10:39:42 -07:00
Tapan Shah 85b88deb18 ShellPkg: Remove current working dir path ".;" from 'path' variable
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-22 14:17:34 -07:00
Tapan Shah 583448b441 ShellPkg: Expand special output file to include "NULL" and case insensitive
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-22 14:17:24 -07:00