Commit Graph

894 Commits

Author SHA1 Message Date
Eric Dong 3cdd434ecf ShellPkg: Replace use case of deprecated function GetVariable with GetVariable2.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18330 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-27 04:45:23 +00:00
Qiu Shumin 57a3e4f9b5 ShellPkg: Fix the ASSERT issue in drvcfg command.
Initialize the local pointer to avoid to free a dangling pointer.

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: Leif Lindholm <leif.lindholm@linaro.org>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18327 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-27 01:23:55 +00:00
Ard Biesheuvel 86819ad00f ShellPkg: use UEFI_APPLICATION module type for Shell components
Some of the libraries under ShellPkg/Library/ are only intended to be
loaded into the Shell by means of a NULL LibraryClass resolution, and
serve no other purpose. Since the Shell itself is a UEFI_APPLICATION, it
makes sense to set the module type of those libraries to UEFI_APPLICATION
as well.

This allows us to use different compiler flags for the Shell application
itself but also for the majority of its constituent parts that are built
separately via these libraries.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-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@18310 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-25 14:54:36 +00:00
Jiaxin Wu d6cf1af908 ShellPkg: Fix 'ifconfig' can't get the address from dhcp in some case
R18201 fix caused ifconfig in shell failed to get the address from dhcp with the
command "ifconfig -s eth0 dhcp" since the default policy is dhcp already.
We can fix it by following the rule to starting the Ip4 auto configuration.

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>
Reviwed-by: Ye Ting <ting.ye@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18244 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-20 06:45:19 +00:00
Ard Biesheuvel ad93e04298 ShellPkg: force use of AARCH64 small model when building DEBUG shell
The tiny code model used by AARCH64 only supports binaries of up to
1 MB in size. Since the Shell application exceeds that when built in
DEBUG mode, make sure we build it using the small code model instead.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Tested-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18241 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-20 06:39:04 +00:00
Qiu Shumin a0f2af3a74 ShellPkg\Tftp.c: Refine parameter name and use implicit comparison for BOOLEAN variable.
1. Refine parameter name to consistent with function headers.
2. To avoid potential bug BOOLEAN values should not use explicit comparisons to TRUE or FALSE.

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@18222 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-14 07:20:09 +00:00
Qiu Shumin 0fcf66a4b2 ShellPkg: Add function comments and refine code format to follow EDKII coding style.
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@18186 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-07 05:42:02 +00:00
Kinney, Michael D f52e226e19 ShellPkg: Refine global variable name to follow EDK II coding style.
EDK II C coding style requires use of 'm' or 'g' for module globals.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: "Kinney, Michael D" <michael.d.kinney@intel.com>
Reviewed-by: Qiu Shumin <shumin.qiu@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18184 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-07 01:33:32 +00:00
Kinney, Michael D eff60c11ea ShellPkg: Fix build failure in VS2015.
Initialize local variable before it is passed into a function by reference.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: "Kinney, Michael D" <michael.d.kinney@intel.com>
Reviewed-by: Qiu Shumin <shumin.qiu@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18183 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-07 01:32:17 +00:00
Jiaxin Wu 3fd56a2672 ShellPkg: Fix issue about ping fail with IPv4
Fix issue about ping fail with IPv4, which is caused by the incorrect
checksum in request message.

Cc: Fu Siyuan <siyuan.fu@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: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Qiu Shumin <shumin.qiu@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18167 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-06 05:45:32 +00:00
Tapan Shah a8d6ea0d5c ShellPkg: Fix 'drivers' assert issue for a driver name longer than 35 characters.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Tapan Shah <tapandshah@hp.com>
Reviewed-by: Chris Phillips <chrisp@hp.com>
Reviewed-by: Qiu Shumin <shumin.qiu@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18157 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-05 00:53:10 +00:00
Jaben Carsey 983fffd431 ShellPkg: prevent Close call when Open failed
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Tapan Shah <tapandshah@hp.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18096 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-28 20:22:26 +00:00
Qiu Shumin b0f81b62de ShellPkg: Fix the ASSERT issue in Shell 'for' loop
The Length parameter of 'GetNextParameter' is the buffer size in bytes.
While StrnCpys requires user to pass the max number of dest unicode char,
we should convert size in bytes to the number of char.

Cc: Jaben Carsey <jaben.carsey@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
[lersek@redhat.com: updated commit message as requested by Jaben]
Signed-off-by: Laszlo Ersek <lersek@redhat.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18059 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-26 08:06:01 +00:00
Andrew Fish 1a670f639b ShellPkg: Fix bad TimeZone (TZ) conversion.
EFI_UNSPECIFIED_TIMEZONE means display local time. TZ of 0 is UTC.
Thus EFI_UNSPECIFIED_TIMEZONE means ignore TZ, 0 means UTC. When this code is
fixed to adust file TZ to local TZ you need to preserve
EFI_UNSPECIFIED_TIMEZONE.

FAT always return EFI_UNSPECIFIED_TIMEZONE.
Modern filesystems, HFS+, NTFS, ext3, etc store time in UTC.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Andrew Fish <afish@apple.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18051 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-26 08:03:35 +00:00
Ronald Cron 6807426071 ShellPkg: Add optional 'tftp' EFI Shell command
This 'tftp' command allows to download a file from a TFTP server.
A specific network interface can be chosen in case there are multiple 
interfaces.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ronald Cron <Ronald.Cron@arm.com>
Reviewed-by: Olivier Martin <Olivier.Martin@arm.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18015 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-15 15:39:53 +00:00
Tapan Shah 68227ac33e ShellPkg: decode serial console attribute set failure status when used thru sermode command
Serial console driver may not support all databits / stopbits attribute values. 
But ‘sermode’ command only displays a general error indicating operation failure. 
Instead it should decode error status and report more accurate error message.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Tapan Shah <tapandshah@hp.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17978 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-14 17:54:12 +00:00
Brendan Jackman c84f2b5cb0 ShellPkg: Increase PcdShellFileOperationSize
This improves performance for dumb filesystem drivers
as block sizes tend to be more 4KB size than 1000 bytes
size.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Brendan Jackman <Brendan.Jackman@arm.com>
Reviewed-by: Olivier Martin <olivier.martin@arm.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17976 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-14 16:04:30 +00:00
Jiaxin Wu 39a650691d ShellPkg: Fix ping IPv6 stack usage mode failure issue
Fix ping IPv6 stack usage mode failure issue and also
update its the help info.
Verified command:
*ping -?
*Ping -_ip6 -_s 2000:bbbb::12 2000:bbbb::8

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>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17940 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-14 03:41:44 +00:00
Qiu Shumin 4dc0d578b8 ShellPkg: Refine code to use Strn**S safe functions instead of Str**S ones in some cases.
Safe string functions may ASSERT when the source length is larger than the MaxDest. This patch use Strn**S to indicate the copy length. 

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Tapan Shah <<tapandshah@hp.com>>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17894 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-09 03:19:06 +00:00
jiaxinwu 41a55ffe79 ShellPkg: Remove Status definition in function scope
that are assigned but never used afterwards.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: jiaxinwu <jiaxin.wu@intel.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17888 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-08 13:41:09 +00:00
jiaxinwu 00a6ad1ba7 ShellPkg: Add Ip4Config2 Protocol defintion in UefiHandleParsingLib
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: jiaxinwu <jiaxin.wu@intel.com>
Reviewed-by: Qiu Shumin <shumin.qiu@intel.com> 

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17870 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-08 02:55:09 +00:00
jiaxinwu 7c25b7ea5b ShellPkg: Update ping/ifconfig library source code to consume Ip4Config2 protocol.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: jiaxinwu <jiaxin.wu@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Tapan Shah <tapandshah@hp.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17869 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-08 02:53:41 +00:00
Bruce Cran cceb4ebd08 ShellPkg: Fix typo of 'determines' in ShellPkg.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Bruce Cran <bruce@cran.org.uk>
Reviewed-by: Qiu Shumin <shumin.qiu@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17868 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-08 01:54:46 +00:00
Heyi Guo a5e28cc1d0 ShellPkg: Fix bug introduced by r17730.
CurrentFilePattern is only part of FilePattern and will be less than or equal to FilePattern. If we use StrCpyS to replace StrnCpy, it will cause assert when FilePattern is longer.
The bug can be replayed when we cd to one directory and run ls command.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Heyi Guo <heyi.guo@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Qiu Shumin <shumin.qiu@intel.com> 


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17821 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-04 02:26:54 +00:00
Jaben Carsey 80f3e34f7a ShellPkg: fix string to number conversion with "0 "
also fixes a few out of date comments.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Tapan Shah <tapandshah@hp.com>
Reviewed-by: Qiu Shumin <shumin.qiu@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17816 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-02 17:26:42 +00:00
Qiu Shumin c587fd3edd ShellPkg: Refine the code logic of StrnCatGrow.
In order to indicate the catena length use StrnCatS instead of StrCatS to generate Destination string, and update the DestMax of Destination string.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Tapan Shah <tapandshah@hp.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17795 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-02 01:12:03 +00:00
Qiu Shumin 2ce8ce9b06 ShellPkg: Refine the code logic of mv.c.
When doing the mv we should check whether source is 'above' dest on file path tree. This patch make the check logic more precise.

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: Samer El-Haj-Mahmoud <elhaj@hp.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17750 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-01 01:46:20 +00:00
Qiu Shumin 6956ecfe1e ShellPkg: Refine code to make catenae length more precise.
This commit refine the catenae length. A too long catenae length in StrnCat may cause potential buffer overflow while in StrnCatS it may ASSERT.

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@17747 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-30 20:15:15 +00:00
Qiu Shumin e75390f029 ShellPkg: Use safe string functions to refine 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>
Reviewed-by: Star Zeng <star.zeng@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17730 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-30 03:18:31 +00:00
Qiu Shumin f5bc9da5a3 ShellPkg: Make BOOLEAN variable not use explicit comparison.
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: Daryl McDaniel <daryl.mcdaniel@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17677 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-23 01:04:26 +00:00
Jaben Carsey 8e4fd502c5 ShellPkg: update Console to clear screen when resetting
This clears the screen when scrolling is ended by a non-scrolling key press.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Tapan Shah <tapandshah@hp.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17632 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-15 20:21:06 +00:00
Qiu Shumin c17c4a1ffd ShellPkg\Application\Shell: Clean start row information after the console has been Reset or SetMode.
OriginalStartRow and CurrentStartRow should be initialized after new mode is set.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Signed-off-by: Eric Jin <eric.jin@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17584 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-09 02:29:37 +00:00
Qiu Shumin 4fe19afeaa ShellPkg: Fix the Non-ASCII char and do code refine.
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@17583 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-09 01:14:10 +00:00
Tapan Shah 307f2ce4e8 ShellPkg: Handle escape characters properly for parse command
parse command does not remove escape character ^ if used to pass special characters like ^ , “ in a quoted -sfo output string. 

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Tapan Shah <tapandshah@hp.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17556 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-03 20:34:48 +00:00
Tapan Shah 421fbf99f8 ShellPkg: Add pipe support for parse command
parse reads data from StdIn when pipe is used and does not require –sfo output stored in a file. (e.g.:  fs0:\> ls *.nsh –sfo | parse FileInfo 2) 

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Tapan Shah <tapandshah@hp.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17555 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-03 20:33:41 +00:00
Jaben Carsey b9a9f56c5f ShellPkg: Update help output for correct alphabetical
This updates help output to put dynamic commands in correct alphabetical location mixed into the other commands.

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: Tapan Shah <tapandshah@hp.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17534 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-28 18:29:15 +00:00
Samer El-Haj-Mahmoud 4024c116f6 ShellPkg: Add DiskInfo GUID matching to the She
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Samer El-Haj-Mahmoud <elhaj@hp.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17447 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-14 16:50:40 +00:00
Qiu Shumin db906063a7 ShellPkg: Fix buffer overflow issue in 'map' command.
This patch replace 'StrnCat' with 'StrnCatS' to avoid the buffer overflow in 'map.c'.

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: Jiewen Yao <jiewen.yao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17387 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-11 01:44:35 +00:00
Liming Gao 00ad50fdf3 ShellPkg: Update CopyRight to 2015
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17266 6f19259b-4bc3-4df7-8a09-765794883524
2015-04-29 08:11:45 +00:00
Liming Gao 6c4542eda2 ShellPkg: Update Shell MemMap command to show PersistentMemory range
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.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@17243 6f19259b-4bc3-4df7-8a09-765794883524
2015-04-29 01:37:32 +00:00
Qiu Shumin 654a012ba5 ShellPkg: Refine the logic about allocating memory for variable name and data.
The run time service 'QueryVariableInfo' is not proper to be used to get the variable name size. This patch refine the logic about allocating memory for variable name and data.

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@17201 6f19259b-4bc3-4df7-8a09-765794883524
2015-04-27 03:09:34 +00:00
Jaben Carsey 74760c96be ShellPkg: Remove memory leak when printing help and there are dynamic commands installed
The list of handles needs to be freed.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Qiu Shumin <shumin.qiu@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17199 6f19259b-4bc3-4df7-8a09-765794883524
2015-04-23 20:28:36 +00:00
Jaben Carsey 2a0473573e ShellPkg/HandleParsingLib: Caller should free memory from 2 functions
Add a comment for GetHandleListByProtocol and GetHandleListByProtocolList to tell the caller they are responsible for freeing the returned memory.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Qiu Shumin <shumin.qiu@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17198 6f19259b-4bc3-4df7-8a09-765794883524
2015-04-23 20:27:53 +00:00
Jaben Carsey bcd5efb1c0 ShellPkg: Remove "ProtocolGuid" from the string for protocol names
Some protocols still had this at the end of protocol name.  remove to standardize.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Tapan Shah <tapandshah@hp.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17194 6f19259b-4bc3-4df7-8a09-765794883524
2015-04-22 19:53:43 +00:00
Olivier Martin 2ce9792534 ShellPkg/UefiShellLevel2CommandsLib: Handle the returned error
If this function fails in release build then the error was
not handled and SourceHandle was not valid.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17184 6f19259b-4bc3-4df7-8a09-765794883524
2015-04-15 18:16:58 +00:00
Tapan Shah bf6bbc212d ShellPkg: fix mv and cp command related issues
1.mv deletes file/directory when trying to move it to non-existing file system.
2.mv causes RSOD in system when trying to move same file at the same location.
3.Refactor mv and cp command with command name passed-in.
remove redundant move status error message when file failed to move across file system.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Tapan Shah <tapandshah@hp.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17129 6f19259b-4bc3-4df7-8a09-765794883524
2015-04-07 20:39:22 +00:00
Laszlo Ersek bbf57d4fb9 ShellPkg: UefiShellDebug1CommandsLib: fix hex string parsing in SETVAR
The ShellCommandRunSetVar() function calls the ShellIsHexOrDecimalNumber()
UefiShellLib function to determine if the data string in the SETVAR
command is a string of hexadecimal bytes.

However, ShellIsHexOrDecimalNumber() calls ShellConvertStringToUint64()
for validation. Therefore SETVAR rejects hex strings that cannot be
interpreted as UINT64 values due to range errors, despite the fact that
the hexadecimal data string of the SETVAR command is supposed to describe
an arbitrary array of bytes, rather than UINT64 values.

The internal library function InternalShellIsHexOrDecimalNumber() comes
close, as the first idea for the fix, however it is not quite right
either; it removes a leading minus sign, plus it allows 0x / 0X prefixes.
This would not be correct for the SETVAR command.

Instead, add a trivial utility function that is specific to the SETVAR
implementation. IsStringOfHexNibbles() accepts empty strings for
simplicity, but where we call it we have already ensured that the data
string is not empty (because that is handled earlier by the "delete
variable" branch of SETVAR). An even number of nibbles is also enforced
near the call site.

Cc: Jaben Carsey <jaben.carsey@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17128 6f19259b-4bc3-4df7-8a09-765794883524
2015-04-07 14:18:40 +00:00
Laszlo Ersek 12e1bb0ee6 ShellPkg: UefiShellDebug1CommandsLib: fix SETVAR option summary
The command line summary for the SETVAR command currently names "-rs"
instead of "-rt":

  SETVAR variable-name [-guid guid][-bs][-rs][-nv] [=data]

Fix it.

Cc: Jaben Carsey <jaben.carsey@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17127 6f19259b-4bc3-4df7-8a09-765794883524
2015-04-07 14:18:35 +00:00
Olivier Martin 88ff5ba793 ShellPkg: Added newline at the end of source files
Some compilers (such as ARM toolchain) complain if there is
no new line at the end of a source file.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17105 6f19259b-4bc3-4df7-8a09-765794883524
2015-04-02 11:32:32 +00:00
Qiu Shumin 484dd08c1a ShellPkg: Remove extra quotes surrounding flag values.
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@17086 6f19259b-4bc3-4df7-8a09-765794883524
2015-04-01 00:49:05 +00:00
Elvin Li ec8a502e66 ShellPkg: update smbiosview for SMBIOS 3.0.
smbiosview can dump 64-bit entry point and table 
as long as SMBIOS 3.0 table exists in system configuration table.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Elvin Li <elvin.li@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17060 6f19259b-4bc3-4df7-8a09-765794883524
2015-03-17 08:12:59 +00:00
Qiu Shumin 85efb9d860 ShellPkg: Fix typo in ShellPkg.
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: Bruce Cran <bruce.cran@gmail.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17056 6f19259b-4bc3-4df7-8a09-765794883524
2015-03-17 01:58:10 +00:00
Qiu Shumin af7a3a5463 ShellPkg: Add type cast to avoid build failure in VS2005.
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@17043 6f19259b-4bc3-4df7-8a09-765794883524
2015-03-13 02:04:17 +00:00
Tapan Shah 3eb46cfce8 ShellPkg: Help and Error Messages Update
Updates to various profile commands help and error message output with better wordings.
Fix few inconsistency issues found in error messages across various profile commands.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Tapan Shah <tapandshah@hp.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17032 6f19259b-4bc3-4df7-8a09-765794883524
2015-03-09 22:18:59 +00:00
Elvin Li d63d22102f ShellPkg: smbiosview shows wrong information for Type 27.
Fixed smbiosview to use correct value to parse Type 27.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Elvin Li <elvin.li@intel.com>
Reviewed-by: Shumin Qiu <shumin.qiu@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17007 6f19259b-4bc3-4df7-8a09-765794883524
2015-03-04 07:50:47 +00:00
Elvin Li 447cb9135c ShellPkg: Fixed EBC build error.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Elvin Li <elvin.li@intel.com>
Reviewed-by: Shumin Qiu <shumin.qiu@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16987 6f19259b-4bc3-4df7-8a09-765794883524
2015-03-03 02:38:26 +00:00
Elvin Li 325d3f8db5 ShellPkg: Update Intel copyright to 2015.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Elvin Li <elvin.li@intel.com>
Reviewed-by: Jaben Carsey <Jaben.carsey@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16944 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-27 03:32:59 +00:00
Elvin Li 1581c9a2b8 ShellPkg: Parse new SMBIOS 3.0 fields.
Parse new SMBIOS 3.0 fields in Type 4: Core Count 2, Core Enabled 2, Thread Count 2.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Elvin Li <elvin.li@intel.com>
Reviewed-by: Jaben Carsey <Jaben.carsey@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16943 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-27 02:10:57 +00:00
Olivier Martin a8577b3a65 ShellPkg/UefiShellLib: Fixed ARM compiler error
ARM Compiler version 5 raises the warning/error (warning treated as error):
#191-D: type qualifier is meaningless on cast type

The compiler team said the warning is valid because from the C90 standard,
section 6.5.3 it is specified that "The properties associated with
qualified types are meaningful only for expressions that are lvalues."

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16888 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-23 11:13:58 +00:00
Joe Peterson d08a546471 Shellpkg: Fix spelling errors in Shell.c/Shell.h comments
This patch fixes spelling errors in comments. No functional change.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Joe Peterson <joe.peterson@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16816 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-06 22:25:05 +00:00
Jaben Carsey a8f98806ed ShellPkg: command help with -? flag is not working and it gives too many arguments error message.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Tapan Shah <tapandshah@hp.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16815 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-06 21:03:28 +00:00
Tapan Shah c011b6c9e2 ShellPkg: Standardized HP Copyright Message String
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Tapan Shah <tapandshah@hp.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16759 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-04 22:25:01 +00:00
Jaben Carsey fe8ec3dd93 ShellPkg: Revert 16720 and 16734.
I will submit a new patch.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <Jaben.carsey@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16758 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-04 16:46:59 +00:00
Jaben Carsey a95cf8f0f4 ShellPkg: Revert 16720 and 16734.
I will submit a new patch.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <Jaben.carsey@intel.com>




git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16757 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-04 16:39:04 +00:00
Jaben Carsey 432bf14cf1 ShellPkg: cast return value to correct type based on what we passed in.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <Jaben.carsey@intel.com>
Reviewed-by: Joe Peterson <joe.peterson@intel.com>
Reviewed-by: Shumin Qiu <shumin.qiu@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16734 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-04 01:23:14 +00:00
Qiu Shumin 69c569bf55 ShellPkg: Fix typos.
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@16733 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-04 01:15:17 +00:00
Tapan Shah e54a10bbca ShellPkg: Update Level3 profile commands response output
Updates to Level3 profile commands response output. 
Updating Level3 profile commands source code to include command name as a prefix in error message.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Tapan Shah <tapandshah@hp.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16732 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-03 21:29:23 +00:00
Tapan Shah ab7c10f28e ShellPkg: Update Network1 profile commands response output
Updates to Network1 profile commands response output. 
Updating Network1 profile commands source code to include command name as a prefix in error message.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Tapan Shah <tapandshah@hp.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16731 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-03 21:27:55 +00:00
Tapan Shah 099e8ff5d2 ShellPkg: Update Level2 profile commands response output
Updates to Level2 profile commands response output. 
Updating Level2 profile commands source code to include command name as a prefix in error message.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Tapan Shah <tapandshah@hp.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16730 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-03 21:24:21 +00:00
Tapan Shah 4092a8f6d0 ShellPkg: Update Debug1 profile commands response output
Updates to Debug1 profile commands response output. 
Updating Debug1 profile commands source code to include command name as a prefix in error message.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Tapan Shah <tapandshah@hp.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16729 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-03 21:22:53 +00:00
Tapan Shah 0861edab30 ShellPkg: Update Level1 profile commands response output
Updates to Level1 profile commands response output. 
Updating Level1 profile commands source code to include command name as a prefix in error message.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Tapan Shah <tapandshah@hp.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16728 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-03 19:20:59 +00:00
Tapan Shah bc2807206b ShellPkg: Update Driver1 profile commands response output
Updates to Driver1 profile commands response output. 
Updating Driver1 profile commands source code to include command name as a prefix in error message.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Tapan Shah <tapandshah@hp.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16727 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-03 19:04:52 +00:00
Tapan Shah 356c553579 ShellPkg: Update bcfg command response output
Updates to bcfg command response output. 

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Tapan Shah <tapandshah@hp.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16726 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-03 18:54:54 +00:00
Tapan Shah 7df7964379 ShellPkg: Update Shell.uni file with a better general command response output.
1.	Updates to the general command response output.
2.	Re-wording some of common shell messages.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Tapan Shah <tapandshah@hp.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16725 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-03 18:37:58 +00:00
Jordan Justen 3f3c4895da */Contributions.txt: Update example email address
Use the example.com domain as recommended in RFC 2606.

NOTE: This does not modify the wording of the "TianoCore Contribution
      Agreement 1.0" section

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Bruce Cran <bruce.cran@gmail.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16724 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-03 17:29:14 +00:00
Jaben Carsey 0a82f7af9b ShellPkg: Refactor out a now-redundant function
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <Jaben.carsey@intel.com>
Reviewed-by: Joe Peterson <joe.peterson@intel.com>
Reviewed-by: Shumin Qiu <shumin.qiu@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16720 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-03 16:50:12 +00:00
Jaben Carsey 5e737e835e ShellPkg: Add quotes around NSH index argument replacement
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <Jaben.carsey@intel.com>
Reviewed-by: Shumin Qiu <shumin.qiu@intel.com>
Reviewed-by: Joe Peterson <joe.peterson@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16699 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-02 21:02:56 +00:00
Qiu Shumin 3ab016b2a3 ShellPkg: Fix typos.
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@16683 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-02 01:51:59 +00:00
Jaben Carsey 7cc7022dfc ShellPkg: Refactor quote and escape search to use new function
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <Jaben.carsey@intel.com>
Signed-off-by: Joe Peterson <joe.peterson@intel.com>
Reviewed-by: Shumin Qiu <shumin.qiu@intel.com>
Reviewed-by: Tapan Shah <tapandshah@hp.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16682 6f19259b-4bc3-4df7-8a09-765794883524
2015-01-30 16:29:20 +00:00
Jaben Carsey 00534bc3e2 ShellPkg: Refactor Split search to generic function
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <Jaben.carsey@intel.com>
Signed-off-by: Joe Peterson <joe.peterson@intel.com>
Reviewed-by: Shumin Qiu <shumin.qiu@intel.com>
Reviewed-by: Tapan Shah <tapandshah@hp.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16681 6f19259b-4bc3-4df7-8a09-765794883524
2015-01-30 16:28:22 +00:00
Jaben Carsey 14030c5c85 ShellPkg: refine command line parsing
Correctly divide up parameters for Argc/Argv including quote ("), escape (^), and space ( ) processing.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <Jaben.carsey@intel.com>
Reviewed-by: Joe Peterson <joe.peterson@intel.com>
Reviewed-by: Tapan Shah <tapandshah@hp.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16673 6f19259b-4bc3-4df7-8a09-765794883524
2015-01-27 18:56:36 +00:00
Jaben Carsey fdd52bde51 ShellPkg: Always remove non-defined environment variable
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <Jaben.carsey@intel.com>
Reviewed-by: Joe Peterson <joe.peterson@intel.com>
Reviewed-by: Tapan Shah <tapandshah@hp.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16672 6f19259b-4bc3-4df7-8a09-765794883524
2015-01-27 18:53:27 +00:00
Qiu Shumin ecd07f3737 ShellPkg: Refine the fomat in INF/DEC files 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@16634 6f19259b-4bc3-4df7-8a09-765794883524
2015-01-22 01:44:11 +00:00
Laszlo Ersek 3fe23dc606 ShellPkg: UefiShellLib: drop wrong PathLib library class dependency
SVN r16601 ("MdeModulePkg, MdePkg, NetworkPkg, OvmfPkg, PerformancePkg,
ShellPkg: Library Migration.") incorporated ShellPkg/Library/BasePathLib
into MdePkg/Library/BaseLib. BasePathLib had been the only instance of
library class PathLib.

Even so, SVN r16606 ("ShellPkg: allow creating of files to create required
directory path") added a PathLib dependency to
"ShellPkg/Library/UefiShellLib/UefiShellLib.inf".

This breaks edk2 platforms that build the "new" UEFI shell from source.
Undo the wrong dependency.

Similarly, update the <Library/PathLib.h> #include directive to
<Library/BaseLib.h> (example function prototype: PathRemoveLastItem()).

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16609 6f19259b-4bc3-4df7-8a09-765794883524
2015-01-14 16:25:48 +00:00
jaben carsey 21a86a7d0a ShellPkg: allow creating of files to create required directory path
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: jaben carsey <jaben.carsey@intel.com>
Reviewed-by: Tapan Shah <tapandshah@hp.com>
Reviewed-by: Joe Peterson <joe.peterson@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16606 6f19259b-4bc3-4df7-8a09-765794883524
2015-01-13 22:16:41 +00:00
Daryl McDaniel ae591c14b3 MdeModulePkg, MdePkg, NetworkPkg, OvmfPkg, PerformancePkg, ShellPkg: Library Migration.
Move libraries from ShellPkg into MdeModulePkg and MdePkg.

The following libraries are being migrated out of ShellPkg in order to make
their functionality more widely available.
  • PathLib:        Incorporate into MdePkg/Library/BaseLib
  • FileHandleLib:  MdePkg/Library/UefiFileHandleLib
  • BaseSortLib:    MdeModulePkg/Library/BaseSortLib
  • UefiSortLib:    MdeModulePkg/Library/UefiSortLib

Diffs showing file changes are in the attached file, LibMigration.patch.
A description of the changes follows:

  • Move ShellPkg/Include/Library/FileHandleLib.h to MdePkg/Include/Library/FileHandleLib.h
  • Move ShellPkg/Include/Library/SortLib.h to MdeModulePkg/Include/Library/SortLib.h
  • Move ShellPkg/Library/BaseSortLib to MdeModulePkg/Library/BaseSortLib
  • Move ShellPkg/Library/UefiSortLib to MdeModulePkg/Library/UefiSortLib
  • Move ShellPkg/Library/BasePathLib/BasePathLib.c to MdePkg/Library/BaseLib/FilePaths.c
  • Merge ShellPkg/Include/Library/PathLib.h into MdePkg/Include/Library/BaseLib.h
  • Delete  ShellPkg/Library/BasePathLib; Includes BasePathLib.c and BasePathLib.inf

  • NetworkPkg/NetworkPkg.dsc
  • PerformancePkg.dsc
  • OvmfPkg/OvmfPkgX64.dsc
  • OvmfPkg/OvmfPkgIa32X64.dsc
  • OvmfPkg/OvmfPkgIa32.dsc
    o Update SortLib and FileHandleLib library classes to point to the new library locations.
    o Remove PathLib library class and make sure that BaseLib is described.

  • MdeModulePkg/MdeModulePkg.dec
    o Add SortLib library class

  • MdePkg/MdePkg.dec
    o Add FileHandleLib library class
    o Add PcdUefiFileHandleLibPrintBufferSize PCD

  • MdePkg/Library/BaseLib/BaseLib.inf
    o Add FilePaths.c to [Sources]

  • MdePkg/Include/Library/BaseLib.h
    o Update file description to include "file path functions"

  • ShellPkg/ShellPkg.dsc
    o Change PACKAGE_GUID to { C1014BB7-4092-43D4-984F-0738EB424DBF }
    o Update PACKAGE_VERSION to 1.0
    o Update SortLib and FileHandleLib library classes to point to the new library locations.
    o Remove PathLib library class and make sure that BaseLib is described.
    o Remove ShellPkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf from [Components]

  • ShellPkg/ShellPkg.dec
    o Update PLATFORM_VERSION to 1.0
    o Remove declarations of the FileHandleLib, SortLib, and PathLib Library Classes
    o Update comment for the PcdShellPrintBufferSize PCD.

  • ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.inf
  • ShellPkg/Application/Shell/Shell.inf
    o Remove PathLib from [LibraryClasses]

  • ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.h
  • ShellPkg/Application/Shell/Shell.h
    o Remove #include <Library/PathLib.h>

  • ShellPkg/Library/UefiShellLevel1CommandsLib/UefiShellLevel1CommandsLib.inf
    o Add PathLib to [LibraryClasses]

  • ShellPkg/Library/UefiShellLevel1CommandsLib/If.c
    o Remove #include <Library/PathLib.h>

  • ShellPkg/Application/ShellSortTestApp/ShellSortTestApp.inf
    o Add MdeModulePkg/MdeModulePkg.dec to [Packages]

  • MdeModulePkg/Library/BaseSortLib/BaseSortLib.inf
  • MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf
    o Replace ShellPkg.dec with MdeModulePkg.dec in [Packages]

  • MdeModulePkg/Library/UefiSortLib/UefiSortLib.c
    o Remove #include <ShellBase.h>
    o Define USL_FREE_NON_NULL() to replace SHELL_FREE_NON_NULL()

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Daryl McDaniel <daryl.mcdaniel@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16601 6f19259b-4bc3-4df7-8a09-765794883524
2015-01-13 01:04:07 +00:00
Qiu Shumin 4243567133 ShellPkg: Check the unrecognized environment variable name before it is removed from command line.
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@16563 6f19259b-4bc3-4df7-8a09-765794883524
2014-12-31 01:31:00 +00:00
Qiu Shumin 6f6792b820 ShellPkg: Add code to handle the split ('|') in a double-quoted string.
This patch update the code in function 'ContainsSplit', and make 'ContainsSplit' depend on 'FindNextInstance'. So we move 'FindNextInstance' in front of 'ContainsSplit'.

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@16560 6f19259b-4bc3-4df7-8a09-765794883524
2014-12-26 08:22:35 +00:00
jaben carsey 2c23ddaa00 ShellPkg: Remove IntelFramweorkModulePkg as Shell library dependency
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: jaben carsey <jaben.carsey@intel.com>
Reviewed-by: Tim Lewis <tim.lewis@insyde.com>
Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hp.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16526 6f19259b-4bc3-4df7-8a09-765794883524
2014-12-16 17:50:57 +00:00
Qiu Shumin 1d6ccad2b9 ShellPkg: Code refine. Add error handling code to check pointer and remove redundant 'ASSERT'.
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@16525 6f19259b-4bc3-4df7-8a09-765794883524
2014-12-16 02:52:00 +00:00
Dong Eric 41089802d5 Refine code to follow edkii coding style.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dong Eric <eric.dong@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16500 6f19259b-4bc3-4df7-8a09-765794883524
2014-12-12 00:45:05 +00:00
Qiu Shumin d86b04fbe9 ShellPkg: Connect all the consoles in "reconnect -r".
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@16473 6f19259b-4bc3-4df7-8a09-765794883524
2014-12-04 01:18:04 +00:00
Samer El-Haj-Mahmoud 59febea1f5 ShellPkg: Update Shell DH command to display more info.
Decode for gEfiAdapterInformationProtocolGuid and added GUIDs for gEfiIsaIoProtocolGuid and gEfiIsaAcpiProtocolGuid protocols.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Samer El-Haj-Mahmoud <elhaj@hp.com>
Reviewed-by: jaben carsey <jaben.carsey@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16445 6f19259b-4bc3-4df7-8a09-765794883524
2014-11-25 22:41:30 +00:00
jaben carsey 0db3fade2c ShellPkg: Add extended USB decoding for consistent device names
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: jaben carsey <jaben.carsey@intel.com>
Reviewed-by: Joe Peterson <joe.peterson@intel.com>
Reviewed-by: Tapan Shah <tapandshah@hp.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16423 6f19259b-4bc3-4df7-8a09-765794883524
2014-11-24 14:58:33 +00:00
jaben carsey cc4c331207 ShellPkg: Add optional extended decode for Vendor Device Nodes for consistent map names
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: jaben carsey <jaben.carsey@intel.com>
Reviewed-by: Joe Peterson <joe.peterson@intel.com>
Reviewed-by: Tapan Shah <tapandshah@hp.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16420 6f19259b-4bc3-4df7-8a09-765794883524
2014-11-24 14:50:14 +00:00
Chris Phillips 76c94bb2dd ShellPkg: Fix 'parse' command to use ," for SFO column delimiter
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chris Phillips <chrisp@hp.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16412 6f19259b-4bc3-4df7-8a09-765794883524
2014-11-20 23:08:00 +00:00
Qiu Shumin bab9f949bf ShellPkg: Code refine to avoid potential dereference of pointer.
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@16410 6f19259b-4bc3-4df7-8a09-765794883524
2014-11-20 01:31:36 +00:00
Jaben Carsey 9b58952287 [PATHC] ShellPkg: control code flow with a PCD
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16342 6f19259b-4bc3-4df7-8a09-765794883524
2014-11-12 21:28:51 +00:00
Qiu Shumin 1531a469eb ShellPkg: Add type cast to avoid build failure in VS2005.
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@16333 6f19259b-4bc3-4df7-8a09-765794883524
2014-11-12 01:07:23 +00:00
Olivier Martin 931b2cff42 ShellPkg: Fixed variable set but never used
This warning/error raised by ARM toolchain prevents to build
the EFI Shell for ARM 32-bit with this toolchain.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16323 6f19259b-4bc3-4df7-8a09-765794883524
2014-11-10 10:20:25 +00:00
jcarsey 658bf43ecf ShellPkg: Fix timezone command
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by : Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Tapan Shah <tapandshah@hp.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16300 6f19259b-4bc3-4df7-8a09-765794883524
2014-11-04 22:33:16 +00:00
Jordan Justen 26830e8579 EDK II Contributions.txt: Update patch format information
Update to show what the patch looks like in email form.

NOTE: This does not modify the wording of the "TianoCore Contribution
      Agreement 1.0" section

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@16297 6f19259b-4bc3-4df7-8a09-765794883524
2014-10-31 22:05:50 +00:00
jcarsey 4d5b818c78 [Patch] ShellPkg: Remove unused PCD from INF file
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by : Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16283 6f19259b-4bc3-4df7-8a09-765794883524
2014-10-31 16:40:46 +00:00
Qiu Shumin 4c4d470eed ShellPkg: Comments update and code refine.
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: Erik Bjorge <erik.c.bjorge@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16209 6f19259b-4bc3-4df7-8a09-765794883524
2014-10-14 01:16:38 +00:00
Qiu Shumin 65ef0b0d01 ShellPkg: Add a typecast to 'BOOLEAN' to avoid build failure in VS2005.
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@16199 6f19259b-4bc3-4df7-8a09-765794883524
2014-10-09 01:25:32 +00:00
Gabriel Somlo e456bb84e0 ShellPkg: fix "incompatible pointer type" build error
Following commit 7fe3fbad05, building
OvmfPkg on Linux breaks with an "incompatible pointer type" error.
This patch adds a cast to supress the warning and allow the build
to complete

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gabriel Somlo <somlo@cmu.edu>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16198 6f19259b-4bc3-4df7-8a09-765794883524
2014-10-08 20:38:05 +00:00
jcarsey 842949fa80 ShellPkg: hexedit command does not return lasterror equal to 0 when exiting from editor
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by : Tapan Shah <tapandshah@hp.com>

Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16197 6f19259b-4bc3-4df7-8a09-765794883524
2014-10-07 19:58:43 +00:00
jcarsey 8896351646 Dmpstore command does not return lasterror equal to 0 when ‘-s’ flag used to dump variables in file
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by : Tapan Shah <tapandshah@hp.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16196 6f19259b-4bc3-4df7-8a09-765794883524
2014-10-07 19:57:23 +00:00
Jaben Carsey 75e34de46c ShellPkg: Fix Meta Data misspelling
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16195 6f19259b-4bc3-4df7-8a09-765794883524
2014-10-03 15:49:59 +00:00
Jaben Carsey 475387e9de ShellPkg: Update SetVar to use existing attributes for updating existing variables.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>
Reviewed-by: Tapan Shah <tapandshah@hp.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16194 6f19259b-4bc3-4df7-8a09-765794883524
2014-10-02 16:41:28 +00:00
Jaben Carsey 7fe3fbad05 ShellPkg: Update MV. now supports across file system moves.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>
Reviewed-by: Tapan Shah <tapandshah@hp.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16193 6f19259b-4bc3-4df7-8a09-765794883524
2014-10-02 16:40:49 +00:00
Qiu Shumin 1fd8de32af ShellPkg: Make the argument type match the function expected parameter type to avoid build fail in GCC45.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Ni Ruiyu <ruiyu.ni@intel.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16163 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-24 05:06:59 +00:00
Qiu Shumin 427d61ad4a ShellPkg: Refine code style to avoid potential NullPointer dereference.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Ni Ruiyu <ruiyu.ni@intel.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16161 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-23 06:20:59 +00:00
Qiu Shumin 77eef0d5a8 ShellPkg: Fix setting hot key for boot option fail.
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@16159 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-23 01:14:30 +00:00
Ni Ruiyu a6e84d95f5 ShellPkg: ShellPkg: Fix the cp fail while coping directory.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ni Ruiyu <ruiyu.ni@intel.com>
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@16148 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-19 01:39:45 +00:00
Qiu Shumin 0faec4cf52 ShellPkg: Remove the redundant quotes around the parameter for 'alias'.
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@16147 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-19 01:34:44 +00:00
Qiu Shumin 715096c244 ShellPkg: Refine code style to avoid potential uninitialized local variable.
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@16146 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-19 01:32:05 +00:00
Ruiyu Ni a308e0588b Roll back check in r15180 which caused the shell always returns EFI_ABORTED no matter what exit-code is specified for "exit" command.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Carsey Jaben <jaben.carsey@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16127 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-18 01:58:03 +00:00
Qiu Shumin 4b6b543e77 ShellPkg: Fix the support for command line comments.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Chris Phillips <chrisp@hp.com>
Reviewed-by: Jaben Carsey <Jaben.carsey@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16126 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-18 01:21:01 +00:00
Ni Ruiyu 75eb337f60 ShellPkg: Do TrimSpace again after StdIn, StdOut, and StdErr are set up.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ni Ruiyu <ruiyu.ni@intel.com>
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@16123 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-17 08:41:31 +00:00
Qiu Shumin 0960ba17e5 ShellPkg: Remove redundant quotes in file path string for Shell command parameters.
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@16122 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-17 07:58:31 +00:00
Qiu Shumin 3a3395f06b ShellPkg: Remove redundant quotes for command 'FOR' in Shell.
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@16121 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-17 07:52:35 +00:00
Qiu Shumin 926be9d10c ShellPkg: Use compare operator for non-Boolean comparisons.
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@16120 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-17 07:48:27 +00:00
Ronald Cron 4152ed2379 ShellPkg: Add support for GCC stack protector
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ronald Cron <Ronald.Cron@arm.com>
Reviewed-By: Olivier Martin <olivier.martin@arm.com>
Reviewed-by: Jaben Carsey <Jaben.carsey@intel.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16116 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-16 18:21:24 +00:00
Harry Liebel 0a8a47e22a ShellPkg: Specify AArch64 intrinsics library
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Harry Liebel <Harry.Liebel@arm.com>
Reviewed-By: Olivier Martin <olivier.martin@arm.com>
Reviewed-by: Jaben Carsey <Jaben.carsey@intel.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16115 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-16 17:46:07 +00:00
Tapan Shah cfffccd9df ShellPkg: Fix ASSERT when bcfg moving boot option with source location = total number of boot options
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Tapan Shah <tapandshah@hp.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16102 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-12 16:46:23 +00:00
Jaben Carsey fba9b6ba24 ShellPkg: Use the new library for "bcfg" command
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Chris Phillips <chrisp@hp.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>
Reviewed by: Tapan Shah <tapandshah@hp.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16093 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-10 20:55:37 +00:00
Jaben Carsey 7b01f0f312 ShellPkg: Add a new library for "bcfg" command
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Chris Phillips <chrisp@hp.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>
Reviewed by: Tapan Shah <tapandshah@hp.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16092 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-10 20:30:38 +00:00
Qiu Shumin 323d3d1118 ShellPkg: Replace the usage of StrnCpy with CopyMem to avoid potential buffer overflow and refine the code style.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Signed-off-by: Yao Jiewen <jiewen.yao@intel.com>
Reviewed-by: Jaben Carsey <Jaben.carsey@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16083 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-10 01:03:43 +00:00
Qiu Shumin cc72674b58 ShellPkg: Replace assignment statement with 'StrnCpy' to append terminal NULL character in a string.
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@16064 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-09 01:47:19 +00:00
Jaben Carsey a753677e33 ShellPkg: Not add redundant quotes any longer to parameters with spaces.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <Jaben.carsey@intel.com>
Reviewed-by: : Qiu Shumin <shumin.qiu@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16062 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-05 02:05:16 +00:00
Qiu Shumin 33fe830841 ShellPkg: Refine the code style and comment.
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@16061 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-05 01:01:24 +00:00
Jaben Carsey 37a4164af3 ShellPkg: Update BCFG command for correct use and errors on moving
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Tapan Shah <tapandshah@hp.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16060 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-04 20:55:29 +00:00
Jaben Carsey 5a51ad8d20 Updates the logic to allow RM and CP to have silent/quiet mode work successfully.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16056 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-03 17:44:53 +00:00
Harry Liebel 710db4e899 ShellPkg: Fix dynamic command help
- Use Shell Help print function that understands Shell Man Page format.
- Move Dynamic help print above the catchall case otherwise the help is
  printed multiple times in case of man page format.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Harry Liebel <Harry.Liebel@arm.com>
Reviewed-by: Olivier Martin <olivier.martin@arm.com>
Reviewed-by: Jaben Carsey <Jaben.Carsey@intel.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16053 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-03 09:04:00 +00:00
Harry Liebel 4be58c16a0 ShellPkg: Add DXE_DRIVER class type to some libraries
Shell Libraries can now be used from Platform Drivers with the
introduction of the Shell Dynamic Command Protocol.
Adding DXE_DRIVER class allows to use these libraries with this
class of driver.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Harry Liebel <Harry.Liebel@arm.com>
Reviewed-by: Olivier Martin <olivier.martin@arm.com>
Reviewed-by: Jaben Carsey <Jaben.Carsey@intel.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16052 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-03 09:03:10 +00:00
Jaben Carsey 7f79b01e8e ShellPkg: Refactor string manipulation
This patch replaces StrCpy with StrnCpy or refactors out the usage of StrCpy through some other means.
This patch replaces StrCat with StrnCat or refactors out the usage of StrCat through some other means.


Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16038 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-02 20:17:38 +00:00
Samer El-Haj-Mahmoud elhaj 8ac6e336ff Cleanup UefiShellDebug1CommandsLib strings to :
* Follow a consistent style
 * Add consistent sections: NOTES, EXAMPLES, RETURN VALUES, etc...)
 * Wrap the text to fit in 80x25 formatted console output
 * Remove excessive and very verbose examples output

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Samer El-Haj-Mahmoud elhaj@hp.com 
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16037 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-02 20:16:47 +00:00
Samer El-Haj-Mahmoud elhaj 073fe5871e Update SmbiosView Shell command to display additional CPU Family
and Socket designations, and fix a couple of typos

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Samer El-Haj-Mahmoud elhaj@hp.com 
Reviewed-By: Jaben Carsey <Jaben.carsey@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16036 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-02 20:03:36 +00:00
Scott Duplichan a3d236df14 ShellPkg: Prevent StrnCpy from overwriting null terminator when source is larger than destination.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Scott Duplichan <scott@notabs.org>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16035 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-02 19:50:09 +00:00
Gao, Liming 3957a5a548 ShellPkg Build failure of AllocateZeroPool usage. This patch updates AllocateZeroPool() to AllocateCopyPool()
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gao, Liming <liming.gao@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16007 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-31 07:58:31 +00:00
Jaben Carsey 284065b0a1 This patch replaces StrCpy with StrnCpy or refactors out the usage of StrCpy through some other means.
This patch replaces StrCat with StrnCat or refactors out the usage of StrCat through some other means.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16005 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-29 22:01:54 +00:00
Jaben Carsey 99ab5fc36c This patch replaces StrCpy with StrnCpy or refactors out the usage of StrCpy through some other means.
This patch replaces StrCat with StrnCat or refactors out the usage of StrCat through some other means.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16004 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-29 21:57:42 +00:00
Jaben Carsey 531733377a This patch replaces StrCpy with StrnCpy or refactors out the usage of StrCpy through some other means.
This patch replaces StrCat with StrnCat or refactors out the usage of StrCat through some other means.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16003 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-29 21:17:46 +00:00
Jaben Carsey 81957f8dfc This patch replaces StrCpy with StrnCpy or refactors out the usage of StrCpy through some other means.
This patch replaces StrCat with StrnCat or refactors out the usage of StrCat through some other means.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16002 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-29 21:17:27 +00:00
Jaben Carsey e87b40b2c7 This patch replaces StrCpy with StrnCpy or refactors out the usage of StrCpy through some other means.
This patch replaces StrCat with StrnCat or refactors out the usage of StrCat through some other means.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16001 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-29 21:17:03 +00:00
Tapan Shah 4ba9b812da Register pre-defined command aliases in sorted order.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Tapan Shah <tapandshah@hp.com>
Reviewed-By: Jaben Carsey <jaben.carsey@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15999 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-29 20:43:08 +00:00
Tapan Shah 227a4b1c48 Add CTRL+C support for ‘devices’ command.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Tapan Shah <tapandshah@hp.com>
Reviewed-By: Jaben Carsey <jaben.carsey@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15998 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-29 20:41:14 +00:00
Tapan Shah 89732f464e Cleanup UefiShellLevel1CommandsLib commands help output string to :
* Follow a consistent style
 * Add consistent sections: NOTES, EXAMPLES, RETURN VALUES, etc.
 * Wrap the text to fit in 80x25 formatted console output

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Tapan Shah <tapandshah@hp.com>
Reviewed-By: Jaben Carsey <jaben.carsey@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15997 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-29 20:40:21 +00:00
Tapan Shah 54206ae7ef Add CTRL+C support for ‘drivers’ command.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Tapan Shah <tapandshah@hp.com>
Reviewed-By: Jaben Carsey <jaben.carsey@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15996 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-29 20:38:27 +00:00
Tapan Shah 376e759308 Add CTRL+C support for ‘dh’ command.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Tapan Shah <tapandshah@hp.com>
Reviewed-By: Jaben Carsey <jaben.carsey@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15995 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-29 20:37:32 +00:00
Tapan Shah 4bed6d8e5d Cleanup UefiShellDriver1CommandsLib commands help output string to :
* Follow a consistent style
  * Add consistent sections: NOTES, EXAMPLES, RETURN VALUES, etc.
  * Wrap the text to fit in 80x25 formatted console output
  * Remove excessive and very verbose examples output

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Tapan Shah <tapandshah@hp.com>
Reviewed-By: Jaben Carsey <jaben.carsey@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15994 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-29 20:36:23 +00:00
Tapan Shah bbe94d7ab3 Add CTRL+C support for ‘devtree’ command.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Tapan Shah <tapandshah@hp.com>
Reviewed-By: Jaben Carsey <jaben.carsey@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15993 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-29 20:34:34 +00:00
Tapan Shah b7cd151207 Cleanup UefiShellInstall1CommandsLib commands help output string to :
* Follow a consistent style
 * Add consistent sections: NOTES, EXAMPLES, RETURN VALUES, etc.
 * Wrap the text to fit in 80x25 formatted console output

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Tapan Shah <tapandshah@hp.com>
Reviewed-By: Jaben Carsey <jaben.carsey@intel.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15992 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-29 20:33:31 +00:00
Tapan Shah 288638f0aa Add CTRL+C support for ‘attrib’ command.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Tapan Shah <tapandshah@hp.com>
Reviewed-By: Jaben Carsey <jaben.carsey@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15991 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-29 20:32:15 +00:00
Tapan Shah 078308324f Cleanup UefiShellLevel2CommandsLib commands help output string to :
* Follow a consistent style
  * Add consistent sections: NOTES, EXAMPLES, RETURN VALUES, etc.
  * Wrap the text to fit in 80x25 formatted console output

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Tapan Shah <tapandshah@hp.com>
Reviewed-By: Jaben Carsey <jaben.carsey@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15990 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-29 20:30:58 +00:00
Tapan Shah 8a3146d46c Add CTRL+C support for ‘ls’ command.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Tapan Shah <tapandshah@hp.com>
Reviewed-By: Jaben Carsey <jaben.carsey@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15989 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-29 20:24:58 +00:00
Tapan Shah 9b5268c8f7 Add new aliases called ‘move’ and ‘mount’ for ‘mv’ and ‘map’ commands respectively.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Tapan Shah <tapandshah@hp.com>
Reviewed-By: Jaben Carsey <jaben.carsey@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15988 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-29 20:22:48 +00:00
Tapan Shah 6cef9b9fc3 Add new alias called ‘cat’ for ‘type’ command.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Tapan Shah <tapandshah@hp.com>
Reviewed-By: Jaben Carsey <jaben.carsey@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15987 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-29 20:19:36 +00:00
Tapan Shah 7ac0f0709f Cleanup UefiShellNetwork1CommandsLib commands help output string to :
* Follow a consistent style
  * Add consistent sections: NOTES, EXAMPLES, RETURN VALUES, etc.
  * Wrap the text to fit in 80x25 formatted console output
  * Remove excessive and very verbose examples output

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Tapan Shah <tapandshah@hp.com>
Reviewed-By: Jaben Carsey <jaben.carsey@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15986 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-29 20:17:57 +00:00
Tapan Shah a1eaacffd0 Cleanup UefiShellLevel3CommandsLib commands help output string to :
* Follow a consistent style
 * Add consistent sections: NOTES, EXAMPLES, RETURN VALUES, etc.
 * Wrap the text to fit in 80x25 formatted console output

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Tapan Shah <tapandshah@hp.com>
Reviewed-By: Jaben Carsey <jaben.carsey@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15985 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-29 20:16:24 +00:00
Tapan Shah 16e5cd90ab Cleanup UefiDpLib ‘dp’ command help output string to :
* Follow a consistent style
 * Add consistent sections: NOTES, EXAMPLES, RETURN VALUES, etc.
 * Wrap the text to fit in 80x25 formatted console output

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Tapan Shah <tapandshah@hp.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15984 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-29 20:02:38 +00:00
Qiu Shumin de4caceb8b ShellPkg: Remove 'STATIC' from function declarations to avoid source level debugging problem.
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@15975 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-29 01:30:43 +00:00
Tapan Shah 41921ad5c3 ShellPkg: Fix ‘ren’ alias for ‘mv’ command.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Tapan Shah <tapandshah@hp.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15974 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-28 19:56:08 +00:00
Jordan Justen fad213a3db EDK II Contributions.txt: Note acceptable contribution licenses
We strongly prefer that contribtions be offered using the same license
as the project/module. But, we should document other acceptable
licenses for contributions.

This will allow package owners to more easily know if they can accept
a contribution under a different source license.

NOTE: This does not modify the wording of the "TianoCore Contribution
      Agreement 1.0" section

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Mark Doran <mark.doran@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15892 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-25 23:10:18 +00:00
Qiu Shumin 59577231a7 ShellPkg: Replace non-ASCII character in Pci.c to fix GCC build error
For Invalid character ‘-’ in Pci.c line 806 and line 811, using ASCII
encoding byte 0x2d to replace.

Example error from GCC 4.9:

ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c:806:5: error: converting to execution character set: Invalid or incomplete multibyte or wide character
     L"Ethernet (802.11a � 5 GHz)",
     ^

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Jaben Carsey <Jaben.carsey@intel.com>
Tested-by: Jordan Justen <jordan.l.justen@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15889 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-25 17:56:27 +00:00
Jaben Carsey f056e4c180 ShellPkg: Update 'pci' command for updated class codes
This updated the strings to be compliant with PCI CODE AND ID ASSIGNMENT SPECIFICATION 1.5.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Signed-off-by: Chris Phillips <chrisp@hp.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15885 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-22 17:02:11 +00:00
Chris Phillips c173a7b9d6 ShellPkg: Fixes and updates for the 'devices' command
- Update 'devices -sfo' format to match UEFI Shell 2.1 spec
- Update help output for easier viewing
- Update 'devices' output format for better alignment when there are many device handles:
     T   D
     Y C I
     P F A
CTRL E G G #P #D #C  Device Name
==== = = = == == === =========================================================

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chris Phillips <chrisp@hp.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15884 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-22 17:00:49 +00:00
Jaben Carsey cea5e3b9bf ShellPkg: Refactor string manipulation
This patch replaces StrCpy with StrnCpy or refactors out the usage of StrCpy through some other means.
This patch replaces StrCat with StrnCat or refactors out the usage of StrCat through some other means.


Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15882 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-22 16:06:55 +00:00
Jaben Carsey 5eadb80f09 ShellPkg: leave quotes around params
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15875 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-21 22:13:08 +00:00
Chris Phillips 78d42190ce ShellPkg: Fixes and updates for the 'parse' command
- Fix SFO file parsing to match UEFI Shell 2.1 spec
- Update help output for easier viewing

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chris Phillips <chrisp@hp.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15873 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-21 20:28:32 +00:00
Chris Phillips 73768087c4 ShellPkg: Fixes and updates for the 'memmap' command
- Update 'memmap -sfo' format to match UEFI Shell 2.1 spec
- Update help output for easier viewing
- Update 'memmap' output format for better alignment

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chris Phillips <chrisp@hp.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15872 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-21 20:26:32 +00:00
Chris Phillips d41a79a0da ShellPkg: Add support for UEFI Shell 2.1 spec command line comments
Example:
Shell> echo "You are ^#1!" # Testing echo
You are #1!

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chris Phillips <chrisp@hp.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15871 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-21 20:18:47 +00:00
Chris Phillips a29117bf9e ShellPkg: Fixes and updates for the 'drivers' command
- Update 'drivers -sfo' format to match UEFI Shell 2.1 spec
- Update help output for easier viewing
- Update 'drivers' output format for better alignment
             T   D
             Y C I
             P F A
DRV VERSION  E G G #D  #C  DRIVER NAME                         IMAGE PATH
=== ======== = = = === === =================================== ==========

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chris Phillips <chrisp@hp.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15870 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-21 20:16:32 +00:00
Chris Phillips 53715dcd50 ShellPkg: Fix 'ls -sfo' and 'map -sfo' output format to match UEFI Shell 2.1 spec
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chris Phillips <chrisp@hp.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15869 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-21 19:59:49 +00:00
Qiu Shumin 30cad98e5f ShellPkg: Fix typo in 'uni' files.
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@15842 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-20 01:20:53 +00:00
Chris Phillips e7e0e42bac ShellPkg: Move mHandleParsingHiiHandle init out of the constructor
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chris Phillips <chrisp@hp.com>
Signed-off-by: Eugene Cohen <eugene@hp.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15841 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-19 23:15:22 +00:00
Chris Phillips deb21fd0ea ShellPkg: Fixes for timezone handling and 'date -sfo'
- Update 'date -sfo' format to match UEFI Shell 2.1 spec
- Fixes to correctly initialize Second
- Set correct sign when setting timezone with the 'time -tz' command.  Now matches UEFI spec calculation of "Localtime = UTC - TimeZone"
- Display "LOCAL" when TimeZone == EFI_UNSPECIFIED_TIMEZONE
- Allow a timezone of '_local' to be provided by user
- Better invalid command line checking

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chris Phillips <chrisp@hp.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15840 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-19 23:05:44 +00:00
Jaben Carsey 98c16be588 ShellPkg: Refactor string manipulation in UefiShellLib command
This patch replaces StrCpy with StrnCpy or refactors out the usage of StrCpy through some other means.
This patch replaces StrCat with StrnCat or refactors out the usage of StrCat through some other means.


Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15839 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-19 21:00:34 +00:00
Jaben Carsey 8af89dae12 ShellPkg: Check while string up to space, not the character
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15838 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-19 20:58:03 +00:00
Chris Phillips 838b31a68c ShellPkg: Fix EFI_SHELL_PROTOCOL to contain new members from UEFI Shell 2.1 spec
- Removes EFI_SHELL_PROTOCOL21
- Adds RegisterGuidName, GetGuidName, GetGuidFromName, and GetEnvEx to EFI_SHELL_PROTOCOL

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chris Phillips <chrisp@hp.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15818 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-18 20:00:08 +00:00
Qiu Shumin f5ba4007ae ShellPkg: Fix comments. Refine code style.
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@15815 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-18 00:48:22 +00:00
Chris Phillips b8a13d7369 ShellPkg: Fix EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL_GUID to match UEFI Shell 2.1 spec
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chris Phillips <chrisp@hp.com>
Reviewed-By: Jaben Carsey <jaben.carsey@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15808 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-14 20:42:40 +00:00
Jaben Carsey e8a57ade2a ShellPkg add size cast to bit operations
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15804 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-14 17:58:16 +00:00
Jaben Carsey e1044f8074 ShellPkg: Refactor string manipulation in cp command
This patch replaces StrCpy with StrnCpy or refactors out the usage of StrCpy through some other means.
This patch replaces StrCat with StrnCat or refactors out the usage of StrCat through some other means.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15771 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-07 20:02:40 +00:00
Jaben Carsey 09fd5328a4 Updates the UEFI Shell to produce the new protocol with additional 4 functions.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>
Reviewed by: Daryl McDaniel <daryl.mcdaniel@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15764 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-06 16:18:38 +00:00
Jaben Carsey 7aae3c355f ShellPkg: add size cast to bit operations
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15763 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-06 16:17:42 +00:00
Jaben Carsey e7a8edfdf6 ShellPkg: Remove double typedef for same struct
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Andrew Fish <afish@apple.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15761 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-05 23:26:51 +00:00
Jaben Carsey 477a79e1eb Updates the logic to allow devices to support SFO output mode
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15760 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-05 23:17:18 +00:00
Jaben Carsey ae315cc269 Fix the use of ASSERT and other fixes to memory allocation failures (like free before return for errors)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15759 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-05 23:16:39 +00:00
Jaben Carsey c12383d5ea Updates the total size logic and the SFO output per UEFI Shell 2.1 changes
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15758 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-05 20:57:08 +00:00
Jaben Carsey 9954df7b63 Updates the logic to allow DmpStore to specify a name independent of specifying a GUID.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15757 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-05 20:56:40 +00:00
Jaben Carsey cab102c36b Updates the logic to allow help to ouput help information from a dynamic shell command
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Lee Rosenbaum <lee.g.rosenbaum@intel.com> 

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15756 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-05 20:56:07 +00:00
Jaben Carsey a737ea734b Updates the logic to allow RM and CP to have silent/quiet mode work successfully.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Lee Rosenbaum <lee.g.rosenbaum@intel.com> 

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15755 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-05 20:55:36 +00:00
Jaben Carsey cf812a204c This searches for handles that produce the dynamic command protocol after searching the commands compiled into the shell.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Eugene Cohen <eugene@hp.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com> 

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15754 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-05 20:09:25 +00:00
Jaben Carsey 6306fd90b7 ShellPkg: Add Dynamic GUID registration into the current GUID<->String conversion process
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15753 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-05 18:03:49 +00:00
Jaben Carsey 044ea4e54e This adds the new APIs for UEFI Shell 2.1 and makes a new structure for shell implementations that are conformant to this new spec. It does not affect existing implementations.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15752 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-05 17:52:18 +00:00
Jaben Carsey 0a1eb97d37 ShellPkg: Add new UEFI Shell 2.1 protocol and fix comments in handle parsing
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15750 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-04 21:17:17 +00:00
Jaben Carsey 9a6ac65ddd ShellPkg: Fix comments
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15749 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-04 20:28:55 +00:00
Qiu Shumin a9e61a2511 Update the en-US definition in 'UefiShellInstall1CommandsLib.uni', 'UefiShellLevel1CommandsLib.uni', 'UefiShellLevel3CommandsLib.uni' and 'UefiShellNetwork1CommandsLib.uni' to make them consistent.
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@15740 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-04 01:06:19 +00:00
Jaben Carsey e66e86ee2d ShellPkg: Add new dynamic command protocol
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15731 6f19259b-4bc3-4df7-8a09-765794883524
2014-07-31 18:07:43 +00:00
Laszlo Ersek 5967886d58 ShellPkg: UpdateStdInStdOutStdErr(): append BOM to new unicode file
The >> operator redirects stdout to a file, using append mode and unicode
encoding. Write the BOM when redirection happens to a new file (which
starts out empty).

This makes the >> operator behave similarly to the > operator, when the
redirection target doesn't exist originally:

  OutUnicode && OutAppend && FileSize == 0 // >> to new unicode file
vs.
  OutUnicode && !OutAppend                 // >  to any unicode file

(Note that (FileSize == 0) is equivalent to "new file" in this context,
due to the earlier "Check that filetypes (Unicode/Ascii) do not change
during an append".)

Reported-by: Lowell Dennis <Lowell_Dennis@Dell.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jaben Carsey <Jaben.carsey@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15725 6f19259b-4bc3-4df7-8a09-765794883524
2014-07-31 15:44:43 +00:00
Laszlo Ersek 94c2a04449 ShellPkg: UpdateStdInStdOutStdErr(): extract WriteFileTag()
Drop TagBuffer in the process.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jaben Carsey <Jaben.carsey@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15724 6f19259b-4bc3-4df7-8a09-765794883524
2014-07-31 15:44:30 +00:00
Eric Dong 0d807dae4a Update code to support VS2013 tool chain.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15704 6f19259b-4bc3-4df7-8a09-765794883524
2014-07-29 02:00:55 +00:00
Jeff Bobzin (jeff.bobzin 2412c2978e ShellPkg: fix typo.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Bobzin (jeff.bobzin@insyde.com) 
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15696 6f19259b-4bc3-4df7-8a09-765794883524
2014-07-28 16:58:34 +00:00
Jaben Carsey 17e59b3346 ShellPkg: Fix calls to SimpleTextOut->SetAttribute to not use reserved bits
As the shell inverts foreground and background it needs to be sure that it properly masks off the reserved bits and this is important since the foreground and background are not the same numbers of bits.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <Jaben.carsey@intel.com>
Reviewed-by: Tapan Shah <tapandshah@hp.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15681 6f19259b-4bc3-4df7-8a09-765794883524
2014-07-25 18:46:23 +00:00
Tapan Shah 148af38722 ShellPkg: Fix Ctrl+C support for dmpstore command.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Tapan Shah <tapandshah@hp.com>
Reviewed-by: Jaben Carsey <Jaben.carsey@intel.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15604 6f19259b-4bc3-4df7-8a09-765794883524
2014-06-30 20:14:24 +00:00
Eric Dong 81cd2f536e Refine code to make it more safely.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Jaben Carsey <Jaben.carsey@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15593 6f19259b-4bc3-4df7-8a09-765794883524
2014-06-26 01:38:46 +00:00
Chris Phillips 83c7a556a2 ShellPkg: Fix 'mv' command to not attempt moving a file from write-protected media
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chris Phillips <chrisp@hp.com>
Reviewed-by: Jaben Carsey <Jaben.carsey@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15584 6f19259b-4bc3-4df7-8a09-765794883524
2014-06-24 18:39:15 +00:00
Tapan Shah e71cb45263 ShellPkg: Move UpdateMapping() out of Map command and added to UefiShellCommandLib library.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Tapan Shah <tapandshah@hp.com>
Reviewed-by: Jaben Carsey <Jaben.carsey@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15580 6f19259b-4bc3-4df7-8a09-765794883524
2014-06-23 18:36:44 +00:00
Jaben Carsey 183ecff566 ShellPkg: Remove use of ASSERT to test parameters
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <Jaben.carsey@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15566 6f19259b-4bc3-4df7-8a09-765794883524
2014-06-18 16:37:16 +00:00
Jaben Carsey 885f7fd0c7 ShellPkg: Fix duplicate String IDs
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <Jaben.carsey@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15562 6f19259b-4bc3-4df7-8a09-765794883524
2014-06-16 21:58:50 +00:00
Qiu Shumin 022ed0d788 Use a compare operator for Non-Boolean comparison in 'map.c'.
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@15559 6f19259b-4bc3-4df7-8a09-765794883524
2014-06-06 08:47:18 +00:00
Jaben Carsey 33eb033f86 ShellPkg: fix Comp command output
The comp command was potentially displaying the incorrect offset into the file due to comparing 3 extra bytes for difference groups.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <Jaben.carsey@intel.com>
Reviewed-by: Tapan Shah <tapandshah@hp.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15558 6f19259b-4bc3-4df7-8a09-765794883524
2014-06-05 22:02:12 +00:00
Jaben Carsey f747c71e30 ShellPkg: fix display for map command with filtering
This patch correctly displays map information when a filter was applied such as “map fs*” or “map f*”, including the use of “-c” to display the consist names first in this situation.

It also moves a statement from both clauses of an “if/else” to above the “if” statement for efficiency.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <Jaben.carsey@intel.com>
Reviewed-by: Tapan Shah <tapandshah@hp.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15548 6f19259b-4bc3-4df7-8a09-765794883524
2014-05-28 17:31:22 +00:00
Jaben Carsey 0c41d28e59 ShellPkg: replace unrecognized Environment Variables with empty quotes so commands or applications know something existed.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <Jaben.carsey@intel.com>
Reviewed-by: Tapan Shah <tapandshah@hp.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15547 6f19259b-4bc3-4df7-8a09-765794883524
2014-05-22 22:06:41 +00:00
Qiu Shumin b5ce69c3da Update the comments for function 'InternalShellExecuteDevicePath' in ShellProtocol.c to make it consistent with parameter names.
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@15546 6f19259b-4bc3-4df7-8a09-765794883524
2014-05-22 08:32:50 +00:00
Qiu Shumin 36d6448c1e Handle multi instances device path while connecting console devices.
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: Michael Kinney <michael.d.kinney@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15537 6f19259b-4bc3-4df7-8a09-765794883524
2014-05-19 00:39:48 +00:00
Jaben Carsey 7282b505c5 ShellPkg: Add error messages to CP when destination file or directory cannot be opened/created
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <Jaben.carsey@intel.com>
Reviewed-by: Tapan Shah <tapandshah@hp.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15530 6f19259b-4bc3-4df7-8a09-765794883524
2014-05-14 16:55:56 +00:00
Jaben Carsey 09a43a5d5c ShellPkg: report error when EfiDecompress is run on a non-compressed file
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <Jaben.carsey@intel.com>
Reviewed-by: Tapan Shah <tapandshah@hp.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15529 6f19259b-4bc3-4df7-8a09-765794883524
2014-05-14 16:54:09 +00:00
Qiu Shumin 0ff8108177 Add code to connect device path of console devices correctly for Shell command 'connect -c'.
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@15524 6f19259b-4bc3-4df7-8a09-765794883524
2014-05-14 01:47:02 +00:00
Olivier Martin cd39fe082c ShellPkg: Do not mix status when executing a command
The function InternalShellExecuteDevicePath() did not differentiate an error occuring during the preparation of an image and an error occurring during its execution.

A use case of the issue was when a EFI application was called in a EFI Shell script. If the EFI application was returning an error then the NSH script stopped its execution. While the EFI Shell specification says the script should continue its execution (see 4.2 Error Handling).

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
Reviewed-by: Jaben Carsey <Jaben.Carsey@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15523 6f19259b-4bc3-4df7-8a09-765794883524
2014-05-13 21:16:42 +00:00
Qiu Shumin 9145d31451 Update the comments for function 'ConvertPixelFormat' in UefiHandleParsingLib.c to make it consistent with parameter name.
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@15521 6f19259b-4bc3-4df7-8a09-765794883524
2014-05-13 01:44:02 +00:00
Tapan Shah 0fb7e718a8 ShellPkg: Add a support to query AdapterInfo protocol for Shell ‘dh’ command.
This patch adds support to display driver handles which has AdapterInfo protocol installed using ‘dh’ command.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Tapan Shah <tapandshah@hp.com>
Reviewed-by: Jaben carsey <Jaben.carsey@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15499 6f19259b-4bc3-4df7-8a09-765794883524
2014-05-07 22:38:16 +00:00
Jaben Carsey 609e0c5815 ShellPkg: Patch to enhance the output around GOP protocol
This patch adds detailed information from the GOP protocol for commands (i.e. DH), that display details about the protocol.

Contributed-under: TianoCore Contribution Agreement 1.0
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@15493 6f19259b-4bc3-4df7-8a09-765794883524
2014-04-30 15:32:27 +00:00
Jaben Carsey bbf904d154 ShellPkg: Fix using root of drive
This allows near complete use of drive roots “fs0:” and “fs0:\” as directories and arguments to commands.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <Jaben.carsey@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>
Reviewed-by: Tapan Shah <tapandshah@hp.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15463 6f19259b-4bc3-4df7-8a09-765794883524
2014-04-11 19:15:02 +00:00
Harry Liebel 5f119dfc90 ShellPkg: Fix compiler warning 'unused variable'
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Harry Liebel <Harry.Liebel@arm.com>
Reviewed-by: Olivier Martin <olivier.martin@arm.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15462 6f19259b-4bc3-4df7-8a09-765794883524
2014-04-11 17:35:22 +00:00
Chris Phillips e9d19a80af ShellPkg: Fix command-line parsing to start with Argv[0] when comparing passed-in options
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chris Phillips <chrisp@hp.com>
Reviewed-By: Olivier Martin <Olivier.Martin@arm.com>
Reviewed-by: Jaben Carsey <Jaben.carsey@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15432 6f19259b-4bc3-4df7-8a09-765794883524
2014-04-04 13:45:36 +00:00
Jaben Carsey d0a5723f50 ShellPkg: Allow opening of root drive nodes
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <Jaben.carsey@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15424 6f19259b-4bc3-4df7-8a09-765794883524
2014-03-31 21:06:13 +00:00
Jaben Carsey 4b5168d852 ShellPkg: Fix potential memory leak when failing to fully create a structure
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <Jaben.carsey@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15423 6f19259b-4bc3-4df7-8a09-765794883524
2014-03-31 20:43:04 +00:00
Chris Phillips d6e88a6c60 ShellPkg: Fix file system change issue that results in ASSERT
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chris Phillips <chrisp@hp.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15406 6f19259b-4bc3-4df7-8a09-765794883524
2014-03-27 18:21:43 +00:00
Jaben Carsey 774ccb4bcc ShellPkg: remove redudant code. call existing API.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <Jaben.carsey@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15354 6f19259b-4bc3-4df7-8a09-765794883524
2014-03-20 17:12:30 +00:00
Jaben Carsey 93b7308337 ShellPkg: Remove unused function
This function was not exposed outside the library and is not used internally.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <Jaben.carsey@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15353 6f19259b-4bc3-4df7-8a09-765794883524
2014-03-20 17:11:52 +00:00
Jaben Carsey efb76d1a74 ShellPkg: Allow for LoadedImageProtocol information to be verbosely exported for commands like "dh"
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <Jaben.carsey@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15352 6f19259b-4bc3-4df7-8a09-765794883524
2014-03-20 17:10:57 +00:00
Jaben Carsey 304ae970ee ShellPkg: Move a function into shared location
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <Jaben.carsey@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15335 6f19259b-4bc3-4df7-8a09-765794883524
2014-03-17 17:18:08 +00:00
Brendan Jackman 0698723204 ShellPkg: ShellCommands/SetVar: Make '-rt' imply '-bs'
It's invalid to set a variable that's available from runtime services but not
from boot services.

Currently if you pass '-rt' without '-bs' you get a generic
'Invalid Parameter' message. We should either print a more useful message in
this case, or make '-rt' imply '-bs' (as this patch does). The Shell Spec is
ambiguous on the matter.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Brendan Jackman <Brendan.Jackman@arm.com>
Reviewed-By: Olivier Martin <olivier.martin@arm.com>
Reviewed-By: Jaben Carsey <jaben.carsey@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15323 6f19259b-4bc3-4df7-8a09-765794883524
2014-03-10 18:13:13 +00:00
Shumin Qiu 4f344fffc7 1.Add code to check the pointer 'CorrectedPath' in Ls.c line 460 before referenced. 2.Not use explicit comparisons to TRUE or FALSE for Boolean variable in Ls.c. 3.Add doxygen tags in comment and return type for 'ToLower' in ShellProtocol.c.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Shumin Qiu <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@15320 6f19259b-4bc3-4df7-8a09-765794883524
2014-03-07 01:06:37 +00:00
Shumin Qiu f716d7b8c5 Convert the value from 'int' to 'CHAR16' to match the type of variable in ShellProtocol.c.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Shumin Qiu <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@15271 6f19259b-4bc3-4df7-8a09-765794883524
2014-02-28 00:36:03 +00:00
Brendan Jackman b9b77ab1ba ShellPkg/ShellProtocol.c: Fix case sensitivity in GetAlias and SetAlias
ShellCommandIsOnAliasList is case insensitive, but GetAlias and SetAlias use the
UEFI variable services, which are case sensitive.

Force alias names to lowercase to get around this.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Brendan Jackman <Brendan.Jackman@arm.com>
Reviewed-By: Olivier Martin <olivier.martin@arm.com>
Reviewed-by: Jaben Carsey <Jaben.carsey@intel.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15270 6f19259b-4bc3-4df7-8a09-765794883524
2014-02-26 09:46:40 +00:00
Jaben Carsey e8c737ae79 ShellPkg: Add missing header files
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <Jaben.Carsey@intel.com>
Reviewed-by: Daryl McDaniel daryl.mcdaniel@intel.com


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15262 6f19259b-4bc3-4df7-8a09-765794883524
2014-02-25 23:03:17 +00:00
Shumin Qiu 3a8406adb3 Add code to check whether the pointer 'CorrectedPath' and 'FullPath' are NULL before used.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Shumin Qiu <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@15260 6f19259b-4bc3-4df7-8a09-765794883524
2014-02-25 08:30:32 +00:00
Jaben Carsey 929fb3be41 ShellPkg: Update "ls" command to better handle "-r" parameter
This makes sure that recursion into sub directories looks through all subdirectories, not just those that match the initial search pass.  Also only prints out any information for directories in which at least one matching file is found.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <Jaben.Carsey@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15250 6f19259b-4bc3-4df7-8a09-765794883524
2014-02-18 21:53:00 +00:00
Jaben Carsey d5b5440bf2 ShellPkg: refactor elimination of non-replaced environment variables
This changes how non-replaced environment variables are found and eliminated from the command line.  This new method makes sure that the found environment variables are not using escaped characters and that they do not stretch over quoted strings

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15242 6f19259b-4bc3-4df7-8a09-765794883524
2014-02-12 18:27:07 +00:00
Shumin Qiu f3a14a0f57 Add code to check the return status for ShellReadFile and ShellWriteFile when execute the 'cp' command.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Shumin Qiu <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@15231 6f19259b-4bc3-4df7-8a09-765794883524
2014-02-12 01:52:27 +00:00
Shumin Qiu a7563b08d9 Add code to check whether the pointer 'PathForReturn' in ShellProtocol.c is NULL before used.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Shumin Qiu <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@15230 6f19259b-4bc3-4df7-8a09-765794883524
2014-02-12 01:51:15 +00:00
Jaben Carsey fc4c7b30d9 ShellPkg: Fix changing to file system with 2 colons like "fs0::"
first colon must be last character in the string.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15226 6f19259b-4bc3-4df7-8a09-765794883524
2014-02-11 23:56:32 +00:00
Jaben Carsey ba71f79058 ShellPkg: Fix uninitialized Variable error
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15225 6f19259b-4bc3-4df7-8a09-765794883524
2014-02-11 23:37:18 +00:00
Brendan Jackman fe6c94d2e1 ShellPkg: InternalShellExecuteDevicePath: avoid memory leaks
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Brendan Jackman <Brendan.Jackman@arm.com>
Reviewed-by: Olivier Martin <olivier.martin@arm.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15224 6f19259b-4bc3-4df7-8a09-765794883524
2014-02-11 22:46:56 +00:00
Brendan Jackman 3e2b20a1ad ShellPkg: Make Argv[0] the full file path of the command
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Brendan Jackman <Brendan.Jackman@arm.com>
Reviewed-by: Olivier Martin <olivier.martin@arm.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15223 6f19259b-4bc3-4df7-8a09-765794883524
2014-02-11 22:45:18 +00:00
Brendan Jackman da92bf853f ShellPkg: Error out when ProcessCommandLine fails
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Brendan Jackman <Brendan.Jackman@arm.com>
Reviewed-by: Olivier Martin <olivier.martin@arm.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15222 6f19259b-4bc3-4df7-8a09-765794883524
2014-02-11 22:43:36 +00:00