Commit Graph

525 Commits

Author SHA1 Message Date
Chris Phillips 416a423f08 ShellPkg: Remove trailing \r\n when redirect to env variable (EX: use ">v")
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@14891 6f19259b-4bc3-4df7-8a09-765794883524
2013-11-22 21:15:19 +00:00
Jaben Carsey 64a5bae21f ShellPkg: Correctly support "map -c"
When “map –c” is run, the mapped items should be displayed with the consistent name as the one listed to the left and all other names listed as “alias(s)”

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

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14881 6f19259b-4bc3-4df7-8a09-765794883524
2013-11-21 22:51:52 +00:00
Chris Phillips c37e0f16be ShellPkg: Update pci command to use ShellPrintEx()
- Also minor simplification to the PciPrintClassCode() function.
- Remove invalid duplicate gShellDebug1HiiHandle argument in STR_PCI_NO_FIND print.

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@14880 6f19259b-4bc3-4df7-8a09-765794883524
2013-11-21 17:21:59 +00:00
Jaben Carsey f79868cd18 ShellPkg: Change MM command output during script execution
-	Automatically use non-interactive mode during script execution.
-	Automatically use non-interactive mode when a specific value is read (omitting this behavior was a violation of the UEFI Shell Spec)
-	Only output the value read in when reading a value in a script; this allows automated use of the MM command.


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


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14874 6f19259b-4bc3-4df7-8a09-765794883524
2013-11-20 17:25:02 +00:00
Jordan Justen 14b5e3fd78 ShellPkg pci command: Fix a typo; /r/n => \r\n
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@14865 6f19259b-4bc3-4df7-8a09-765794883524
2013-11-19 23:02:59 +00:00
Jaben Carsey 6b640b4a97 ShellPkg: Add EfiIdeControllerInitProtocol to Shell’s output
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@14864 6f19259b-4bc3-4df7-8a09-765794883524
2013-11-19 22:18:33 +00:00
Jaben Carsey e82edcf914 ShellPkg: "For Run" fix for spaces between numerals
Since this is expected to use a string with spaces between some of the numbers, the function must halt on spaces and not skip them.

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@14854 6f19259b-4bc3-4df7-8a09-765794883524
2013-11-15 20:28:58 +00:00
Jaben Carsey d233c12291 ShellPkg: Fix help MAN file searching
Make sure that “help App” and “help App.EFI” work the same by removing “.efi” (case insensitive) from the end of the string before searching for MAN 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@14853 6f19259b-4bc3-4df7-8a09-765794883524
2013-11-15 20:21:34 +00:00
Jaben Carsey 12f1a36cf4 ShellPkg: Rename duplicate STRING ID
There were 2 "STR_UCS2" strings.  This renames one of them so they are unique.

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@14852 6f19259b-4bc3-4df7-8a09-765794883524
2013-11-15 18:55:36 +00:00
Chris Phillips 28cdb62bcd ShellPkg: Add DiskIO2, and fix GUID from string check to be case insensitive
- Add DiskIO2 to list of known protocols
- Fix string check to be case insensitive for commands like ‘dh –p protocolname’

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@14851 6f19259b-4bc3-4df7-8a09-765794883524
2013-11-15 18:44:29 +00:00
Chris Phillips 13acebbdef ShellPkg: Skip leading tabs when processing command line and scripts
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@14850 6f19259b-4bc3-4df7-8a09-765794883524
2013-11-15 18:41:50 +00:00
Jaben Carsey 6813ba402a ShellPkg: verify that leading and trailing % are removed from variable names when doing command line redirection to an environment variable.
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@14849 6f19259b-4bc3-4df7-8a09-765794883524
2013-11-15 18:39:26 +00:00
Jaben Carsey d59fc24497 ShellPkg: clarify space limitation in comment.
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@14845 6f19259b-4bc3-4df7-8a09-765794883524
2013-11-14 23:52:43 +00:00
Chris Phillips 5b5cd144f3 ShellPkg: Properly set lasterror environment variable
- Set lasterror value based on platform width
- Use “lasterror” rather than “Lasterror” for variable name to match Shell Specification
- Set lasterror value when a binary or script file is not found

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@14816 6f19259b-4bc3-4df7-8a09-765794883524
2013-10-29 16:30:25 +00:00
Chris Phillips dcf9b428e6 ShellPkg: Fixes the shell so output redirection works for the 'mode' command
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@14800 6f19259b-4bc3-4df7-8a09-765794883524
2013-10-24 17:47:57 +00:00
Chris Phillips 85a3fa3ad7 ShellPkg: Stop running command when page break quit
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@14799 6f19259b-4bc3-4df7-8a09-765794883524
2013-10-24 17:29:33 +00:00
Eric Dong 2c5a8aed24 ShellPkg: Fix copy load option error.
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@14795 6f19259b-4bc3-4df7-8a09-765794883524
2013-10-22 01:14:54 +00:00
Chris Phillips a4883d4cb6 ShellPkg: Fixes for the ‘type’ command:
- Better handling to skip byte order mark in Unicode files.
- Only display valid ASCII characters.
- Change to use ShellPrintEx() instead of Print().
- Print each character instead of %s to avoid possible overrun when not NULL terminated.
- Check for ExecutionBreak.

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@14788 6f19259b-4bc3-4df7-8a09-765794883524
2013-10-18 20:53:06 +00:00
Chris Phillips c32ad35161 ShellPkg: Fix for the ‘mv’ command when destination starts with ‘\’.
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@14787 6f19259b-4bc3-4df7-8a09-765794883524
2013-10-18 20:10:18 +00:00
Chris Phillips 58b7301ec9 ShellPkg: Fixes for the ‘ls’ command:
- Better output to print header and file not found text
- Fix file attribute argument handling
- Fix so path ending with ‘\’ or ‘*’ is handled correctly

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@14786 6f19259b-4bc3-4df7-8a09-765794883524
2013-10-18 18:53:16 +00:00
Chris Phillips abbea36e3e ShellPkg: Fixes ‘edit’ command to correctly display ASCII or UNICODE for the file type.
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@14785 6f19259b-4bc3-4df7-8a09-765794883524
2013-10-18 18:11:52 +00:00
Chris Phillips 284e034f4f ShellPkg: Fixes for shell application launch, argument handling, and version output:
- Fixes shell application launch version output to match ‘ver’ command, as specified by the UEFI Shell spec.
- Adds PcdShellSupplier for <shell-supplier-specific-data> line of version output.  Defaulted to “EDK II”.
- Display only 1 startup.nsh countdown line per second instead of 10 per second.
- Fix issue where command line is just 1 or more “ “ characters and displayed garbage.
- Fix for @echo –off and @echo –on to not restore echo state

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@14784 6f19259b-4bc3-4df7-8a09-765794883524
2013-10-18 15:49:23 +00:00
Chris Phillips 6bb0ff6059 ShellPkg: Fix ‘ifconfig’ so it will build with NIC_IP4_CONFIG_INFO.Permanent change, and update the STR_IFCONFIG_PERMANENT_STATUS string token.
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@14745 6f19259b-4bc3-4df7-8a09-765794883524
2013-10-04 16:34:19 +00:00
Chris Phillips 891e9f0581 ShellPkg: Fix ‘ifconfig’ so it will build with NIC_IP4_CONFIG_INFO.Permanent change, and update the STR_IFCONFIG_PERMANENT_STATUS string token.
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@14744 6f19259b-4bc3-4df7-8a09-765794883524
2013-10-04 15:38:38 +00:00
Samer El-Haj-Mahmoud elhaj 928927dd8e Fix spelling typo in the NIC_IP4_CONFIG_INFO.Permanent variable name, which was incorrectly called NIC_IP4_CONFIG_INFO.Perment
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@14743 6f19259b-4bc3-4df7-8a09-765794883524
2013-10-01 22:12:51 +00:00
Sergei Antonov 037ca23593 ShellPkg: Handle pool allocation failure
FreePool() will receive NULL if AllocateZeroPool() fails.
So a check for NULL is needed.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Sergei Antonov <saproj@gmail.com>
reviewed-by: jaben carsey <jaben.carsey@gmail.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14689 6f19259b-4bc3-4df7-8a09-765794883524
2013-09-20 20:10:17 +00:00
Sergei Antonov 6b6aa6d136 ShellPkg: Handle pool allocation failure
If AllocateZeroPool() returns NULL,
GetVariable() will return EFI_BUFFER_TOO_SMALL,
FreePool() will receive NULL.
So check for NULL before FreePool().

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

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14688 6f19259b-4bc3-4df7-8a09-765794883524
2013-09-19 17:23:10 +00:00
Eric Dong a71003f249 Refine the select language logic.
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@14629 6f19259b-4bc3-4df7-8a09-765794883524
2013-09-05 03:02:14 +00:00
Robert Matthews ed34da4007 ShellPkg: Fix LastError environment variable truncation
-Fixes LastError environment variable being truncated to 32 bits on 64 bit systems
-Fixes possible buffer overrun issue with LastError string value

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Robert Matthews <robert.matthews@hp.com>
Reviewed-by: Jaben Carsey <Jaben.carsey@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14608 6f19259b-4bc3-4df7-8a09-765794883524
2013-08-28 14:38:13 +00:00
Olivier Martin 5051c2873b ShellPkg: Fixed build errors related to variable declarations
- variable "TempLocation" was set but never used

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@14605 6f19259b-4bc3-4df7-8a09-765794883524
2013-08-27 09:01:54 +00:00
Jaben Carsey 9f56625f2a ShellPkg: Fix potentially uninitialized variable compiler warning
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@14598 6f19259b-4bc3-4df7-8a09-765794883524
2013-08-23 15:21:16 +00:00
Jaben Carsey df07baea2f ShellPkg: update behavior with undefined environment variables
Undefined environment variables are now removed during script execution.
Excepted environment variables are now correctly un-excepted right before processing continues

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

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14585 6f19259b-4bc3-4df7-8a09-765794883524
2013-08-21 18:11:23 +00:00
Jaben Carsey ac8783c8b1 ShellPkg: Fix file size error upon copy operation.
There was a case where an copy operation of a small file overwriting a larger file would not correctly remove the extra space in the old file.  The resultant file would have the entire source file and then what remained of the original file.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <Jaben.carsey@intel.com>
reviewed-by: El-Haj-Mahmoud, Samer <samer.el-haj-mahmoud@hp.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14584 6f19259b-4bc3-4df7-8a09-765794883524
2013-08-21 17:32:16 +00:00
Eugene Cohen 433a21cba1 ShellPkg: increase available size for PcdShellFileOperationSize
Some storage subsystems benefit by having shell file operation sizes (affecting copy and type commands right now) larger than 2^16.  This patch changes the PcdShellFileOperationSize type to 32-bits.

Contributed-under: TianoCore Contribution Agreement 1.0
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@14534 6f19259b-4bc3-4df7-8a09-765794883524
2013-08-08 22:31:54 +00:00
Ruiyu Ni e3df6949e7 Fix GCC build failure.
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14519 6f19259b-4bc3-4df7-8a09-765794883524
2013-07-30 06:41:43 +00:00
Ruiyu Ni 863986b3c8 Update all the code to consume the ConvertDevicePathToText, ConvertDevicePathNodeToText, ConvertTextToDevicePath and ConvertTextToDeviceNode APIs in DevicePathLib.
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Elvin Li <elvin.li@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Guo Dong <guo.dong@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14505 6f19259b-4bc3-4df7-8a09-765794883524
2013-07-26 03:14:08 +00:00
Harry Liebel 8477cb6e15 ShellPkg: Added Aarch64 support
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Harry Liebel <Harry.Liebel@arm.com>
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@14485 6f19259b-4bc3-4df7-8a09-765794883524
2013-07-18 15:38:25 +00:00
Jaben Carsey 75a68c6969 ShellPkg: remove high bit to change a EFI_STATUS to a SHELL_STATUS
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@14484 6f19259b-4bc3-4df7-8a09-765794883524
2013-07-18 15:36:55 +00:00
Gary Ching-Pang Lin 73c5c61904 ShellPkg: Update error to be SHELL_STATUS and not EFI_STATUS.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gary Ching-Pang Lin <glin@suse.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14475 6f19259b-4bc3-4df7-8a09-765794883524
2013-07-16 14:40:57 +00:00
jaben carsey 7461437cf1 ShellPkg: Verify memory and handle allocation failure.
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@14448 6f19259b-4bc3-4df7-8a09-765794883524
2013-06-28 22:44:21 +00:00
jaben carsey ca79c79821 ShellPkg: make automatically created shells quit automatically
This creates a new parameter to this shell implementation “_exit” that causes the shell to automatically exit after running the initial specified command line.  This also automatically uses that command in the Execute() API.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-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@14444 6f19259b-4bc3-4df7-8a09-765794883524
2013-06-27 16:11:39 +00:00
Jaben Carsey 22feb630eb ShellPkg: Update rm command to properly prepend file system identifiers to filenames.
This is required when recursively removing directories with files on file systems other than the current one.

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

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14441 6f19259b-4bc3-4df7-8a09-765794883524
2013-06-21 21:20:03 +00:00
jcarsey 28981267c5 ShellPkg: Fix ARM build errors.
submitted-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@14400 6f19259b-4bc3-4df7-8a09-765794883524
2013-06-11 22:07:03 +00:00
Eric Dong ed053afece ShellPkg: refine the logic for cp command
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Jaben Carsey <Jaben.carsey@intel.com>
Reviewed-by: Erik Bjorge <Erik.c.Bjorge@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14394 6f19259b-4bc3-4df7-8a09-765794883524
2013-06-04 01:06:22 +00:00
jcarsey e8dc04b743 ShellPkg: make help footer string have same info as help usage information
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://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14391 6f19259b-4bc3-4df7-8a09-765794883524
2013-05-28 20:21:51 +00:00
lgao4 d0cec2da21 Correct the incorrect Copyright or License in EDKII source files.
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Hess Chen (hesheng.chen@intel.com)


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14383 6f19259b-4bc3-4df7-8a09-765794883524
2013-05-22 02:19:16 +00:00
darylm503 e643951bc5 ShellPkg\Library\UefiShellCEntryLib\UefiShellCEntryLib.c:
Return actual error codes instead of EFI_UNSUPPORTED for all errors.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by:  daryl.mcdaniel@intel.com
Reviewed-by:    jaben.carsey@intel.com


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14368 6f19259b-4bc3-4df7-8a09-765794883524
2013-05-15 20:39:04 +00:00
jcarsey d7bb8de9b9 ShellPkg: remove unused enum
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://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14353 6f19259b-4bc3-4df7-8a09-765794883524
2013-05-13 17:22:30 +00:00
lgao4 cbcccd2c9d Update Code to pass EBC compiler.
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14352 6f19259b-4bc3-4df7-8a09-765794883524
2013-05-13 02:36:09 +00:00
jcarsey 391206e775 ShellPkg: Update behavior for GetTime() errors.
Please find the attached patch that fixes the ShellPkg when gRT->GetTime() returns an error (eg: early UEFI platform bringup with a RTC controller that is not supported).
On some platforms, gRT->GetTime() might not return EFI_SUCCESS. The Shell must check the return status before to assume the returned time is 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://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14337 6f19259b-4bc3-4df7-8a09-765794883524
2013-05-09 16:18:58 +00:00
jcarsey 224e8e2f47 ShellPkg: Return an error when it happens
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://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14336 6f19259b-4bc3-4df7-8a09-765794883524
2013-05-09 16:16:21 +00:00
jcarsey e755a4ca10 ShellPkg: Fixed build error 'variable set but not used'
GCC toolchain cannot build ShellPkg.

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

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14326 6f19259b-4bc3-4df7-8a09-765794883524
2013-05-07 17:57:58 +00:00
jcarsey 0290177adf ShellPkg: explicitly prevent dereferencing pointer
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://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14291 6f19259b-4bc3-4df7-8a09-765794883524
2013-04-18 16:05:59 +00:00
ydong10 2426f6669f Add the missing file to the inf.
Signed-off-by: Eric Dong

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14240 6f19259b-4bc3-4df7-8a09-765794883524
2013-04-02 08:34:45 +00:00
jcarsey dd42277f89 ShellPkg: Remove PerformancePkg requirement and add the header itself.
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://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14212 6f19259b-4bc3-4df7-8a09-765794883524
2013-03-19 20:17:47 +00:00
jcarsey f06be00e7a ShellPkg: Fixes CP function to prevent copying of files if destination does not have adequate storage.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Matt Stanbro <Matthew.A.Stanbro@intel.com>
Reviewed-by: Jaben Carsey <Jaben.carsey@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14203 6f19259b-4bc3-4df7-8a09-765794883524
2013-03-12 20:56:36 +00:00
jcarsey 7c8e7960ef ShellPkg: Rewrite’s Help.c to call the ShellPrintHelp function.
also, adds a footer to the bottom of the “help” command to explain help switches. 

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


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14202 6f19259b-4bc3-4df7-8a09-765794883524
2013-03-12 20:54:07 +00:00
ydong10 a9b4ff8d01 Update code to follow coding style.
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14166 6f19259b-4bc3-4df7-8a09-765794883524
2013-03-11 01:22:51 +00:00
jcarsey d41bc92c99 ShellPkg: Add "dp" command library to ShellPkg.
This command is only included in the build with command line option "-D INCLUDE_DP".  The user must also update the DSC with appropriate library instances that match the platform for the build to succeed.

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://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14160 6f19259b-4bc3-4df7-8a09-765794883524
2013-03-04 22:02:59 +00:00
jcarsey 365aa98a5d ShellPkg: Add ShellPrintHelp function to ShellLib.
This function allows for easier access to printing standard command help.

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

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14159 6f19259b-4bc3-4df7-8a09-765794883524
2013-03-04 21:54:02 +00:00
jcarsey 7dd0562309 ShellPkg : Check pointer before dereferencing
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://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14144 6f19259b-4bc3-4df7-8a09-765794883524
2013-02-22 18:20:55 +00:00
jcarsey fb5278ef78 ShellPkg: Added function ShellDeleteByName which deletes a file by name.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Matthew Stanbro <matthew.a.stanbro@intel.com>
Reviewed-by: Jaben Carsey <Jaben.carsey@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14138 6f19259b-4bc3-4df7-8a09-765794883524
2013-02-20 18:21:14 +00:00
jcarsey 54c9a68d9c ShellPkg: fix string truncation.
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://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14129 6f19259b-4bc3-4df7-8a09-765794883524
2013-02-14 01:02:15 +00:00
jcarsey 668a5781d3 ShellPkg: add verification that a target directory exists when changing directory with drive identifier.
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://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14128 6f19259b-4bc3-4df7-8a09-765794883524
2013-02-13 22:22:16 +00:00
jcarsey 6d9eb8c380 ShellPkg: Remove beta tag from ver command output.
Signed-off-by: Jaben Carsey <Jaben.Carsey@intel.com>
reviewed-by: lee rosenbaum <lee.g.rosenbaum@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14121 6f19259b-4bc3-4df7-8a09-765794883524
2013-02-04 22:20:28 +00:00
ydong10 0b6cb335fa Fixed some alignment faults in IPF platform
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Carsey Jaben <jaben.carsey@intel.com>




git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14081 6f19259b-4bc3-4df7-8a09-765794883524
2013-01-25 02:00:22 +00:00
jcarsey e886b675bd ShellPkg: Fix pointer initialization error of “ShellOpt” Shell environment variable
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://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14064 6f19259b-4bc3-4df7-8a09-765794883524
2013-01-17 19:04:36 +00:00
jcarsey caa6c0cca2 ShellPkg: Minor change to EDIT and HEXEDIT commands to make the title bars consistent and remove unnecessary “2.0” string
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://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14063 6f19259b-4bc3-4df7-8a09-765794883524
2013-01-17 19:04:02 +00:00
jcarsey 5904052aab ShellPkg: Updates to DumpHex() and ‘dmem’ command for correct output format
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://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14010 6f19259b-4bc3-4df7-8a09-765794883524
2012-12-19 16:47:06 +00:00
ydong10 eafd681e28 Refine code to follow coding style.
Signed-off-by: Eric Dong <eric.dong@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14008 6f19259b-4bc3-4df7-8a09-765794883524
2012-12-17 11:16:16 +00:00
jcarsey d51088b764 ShellPkg: Updates to 'help' command
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://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13997 6f19259b-4bc3-4df7-8a09-765794883524
2012-12-13 21:26:22 +00:00
jcarsey 7ac133d002 ShellPkg: Updates to 'smbiosview' command
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://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13996 6f19259b-4bc3-4df7-8a09-765794883524
2012-12-13 21:11:21 +00:00
jcarsey 73b5f8bcee ShellPkg: Remove “2.0” prefix text from shell prompt.
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://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13982 6f19259b-4bc3-4df7-8a09-765794883524
2012-12-03 16:40:55 +00:00
jcarsey 926704714e ShellPkg: Fix line responsible for deleting “cwd” variable when exit shell.
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://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13943 6f19259b-4bc3-4df7-8a09-765794883524
2012-11-14 23:43:33 +00:00
jcarsey 0406a5717b ShellPkg: Clean up header file usage.
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://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13939 6f19259b-4bc3-4df7-8a09-765794883524
2012-11-13 22:39:09 +00:00
jcarsey 3f869579a4 ShellPkg: Correct 3 places where memory was not being properly released by the shell.
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: Liu, Jiang A <jiang.a.liu@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13938 6f19259b-4bc3-4df7-8a09-765794883524
2012-11-13 16:08:52 +00:00
niruiyu 7714cf7d0d Fix a bug that BCFG creates Key#### variable bigger than it should be.
Signed-off-by: Ruiyu Ni<ruiyu.ni@intel.com>
Reviewed-by: Eric Dong<eric.dong@intel.com>


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13862 6f19259b-4bc3-4df7-8a09-765794883524
2012-10-18 07:32:42 +00:00
sfu5 75dce34062 1. Fix a bug in PXE driver that the PXE boot do not restart if a new boot option on the different IP stack is selected.
2. Retrieve the IP information after iSCSI TCPv6 connection established and fill it into iBFT table.
3. Generate a random IAID for each NIC port to require different IPv6 address in PXE driver.
4. Update function EfiMtftp6Configure() and Mtftp6RrqHandleOack() to allocate at most one UdpIo.
5. Fix a typo from “destory” to “destroy” in network code.

Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Ouyang Qian <qian.ouyang@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13859 6f19259b-4bc3-4df7-8a09-765794883524
2012-10-17 08:23:41 +00:00
lzeng14 ce68d3bc68 Add missing braces around initializer.
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Qian Ouyang <qian.ouyang@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13817 6f19259b-4bc3-4df7-8a09-765794883524
2012-10-11 02:15:23 +00:00
mdkinney f330ff35dc Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Jaben Carsey <Jaben.carsey@intel.com>

1) ShellPkg/Library/UefiHandleParsingLib
    a. UefiHandleParsingLib.c – ConvertHandleToHandleIndex() and ConvertHandleIndexToHandle()
        i. Update to work correctly when handles are destroyed due to driver disconnect operations.  Same handle index is never reused.
    b. UefiHandleParsingLib.c – ParseHandleDatabaseByRelationshipWithType() and ParseHandleDatabaseForChildControllers()
        i. Expand to handle Service Binding Protocol usage such as Network stack.
2) ShellPkg/Library/UefiShellDriver1CommandsLib
    a. DevTree.c – Fix bug where the same handle is shown more than once.
    b. Dh.c – Fix use of GetDriverName() and GetDriverImageName().  The status returned must always be evaluated. 
    c. Disconnect.c – Remove requirement that a handle being disconnected must support Device Path Protocol.  This prevents driver model handles without device paths from being disconnected (i.e. Network Stack)
    d. OpenInfo.c – Fix bug when showing open info about a ControllerHandle that has been destroyed due to a disconnect or an unload operation.
    e. UefiShellDriver1CommandsLib.uni – Fix “drivers” command formatting when handle indexes have more than 2 characters.


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13786 6f19259b-4bc3-4df7-8a09-765794883524
2012-10-05 22:26:25 +00:00
ydong10 44890dbde6 Refine code to make it more safely.
Signed-off-by: Eric Dong <eric.dong@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13712 6f19259b-4bc3-4df7-8a09-765794883524
2012-09-10 09:35:43 +00:00
ydong10 f480fdc0f9 Fix always allocate memory issue.
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Jaben Carsey <Jaben.carsey@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13706 6f19259b-4bc3-4df7-8a09-765794883524
2012-09-07 01:55:33 +00:00
ydong10 81634bfb53 Fix display color error when scroll up/down the screen.
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Jaben Carsey <Jaben.carsey@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13705 6f19259b-4bc3-4df7-8a09-765794883524
2012-09-07 01:54:47 +00:00
ydong10 44c5d6b548 Refine coding style.
Signed-off-by: Eric Dong <eric.dong@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13700 6f19259b-4bc3-4df7-8a09-765794883524
2012-09-05 08:46:51 +00:00
ydong10 99bb0f8dd7 Fix build fail.
Signed-off-by: Eric Dong <eric.dong@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13697 6f19259b-4bc3-4df7-8a09-765794883524
2012-09-04 08:35:16 +00:00
ydong10 d6972185d0 Refine the code to make it more safely.
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Jaben Carsey <Jaben.carsey@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13696 6f19259b-4bc3-4df7-8a09-765794883524
2012-09-03 01:59:05 +00:00
niruiyu 3206b5e75d Change Bcfg.c to use the new definition of EFI_KEY_OPTION.
Signed-off-by: Ruiyu Ni<ruiyu.ni@intel.com>
Reviewed-by: Eric Dong<eric.dong@intel.com>


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13681 6f19259b-4bc3-4df7-8a09-765794883524
2012-08-27 10:09:34 +00:00
niruiyu 6a34a2e43c Change Bcfg.c to use the new definition of EFI_KEY_OPTION.
Signed-off-by: Ruiyu Ni<ruiyu.ni@intel.com>
Reviewed-by: Eric Dong<eric.dong@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13678 6f19259b-4bc3-4df7-8a09-765794883524
2012-08-27 05:05:24 +00:00
ydong10 4ccd9214a4 Update the "ConErr" related variable name to the new one "ErrOut".
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Jaben Carsey <Jaben.carsey@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13641 6f19259b-4bc3-4df7-8a09-765794883524
2012-08-17 03:58:17 +00:00
ydong10 36384ceb64 Refine get default language logic for command "drivers".
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Jaben Carsey <Jaben.carsey@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13603 6f19259b-4bc3-4df7-8a09-765794883524
2012-08-10 01:10:05 +00:00
ydong10 a7e57bd9e0 The format strings are using notations that require UINTNs (like "0x%02x") but a UINT64 type was being passed instead. This patch adds a typecast to UINTN so the print processing works correctly.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eugene Cohen eugene@hp.com
Reviewed-by: Eric Dong <eric.dong@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13597 6f19259b-4bc3-4df7-8a09-765794883524
2012-08-07 00:54:29 +00:00
ydong10 1df5c64cf3 Fix a width count error in ClearScreen function.
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Jaben Carsey <Jaben.carsey@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13596 6f19259b-4bc3-4df7-8a09-765794883524
2012-08-07 00:47:06 +00:00
ydong10 cd0842dc82 Refine code to follow coding style.
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Jaben Carsey <Jaben.carsey@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13595 6f19259b-4bc3-4df7-8a09-765794883524
2012-08-07 00:44:28 +00:00
niruiyu 402e4a9d77 Change the type of NotifyHandle from EFI_HANDLE to VOID * for SimpleTextInEx protocol.
Clean up the code to remove unnecessary NotifyHandle in the private data structure.

Signed-off-by: Ruiyu Ni<ruiyu.ni@intel.com>
Reviewed-by: Elvin Li<elvin.li@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13565 6f19259b-4bc3-4df7-8a09-765794883524
2012-07-30 03:50:42 +00:00
ydong10 c85c6de761 Fix build fail for GCC
Signed-off-by: Eric Dong <eric.dong@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13559 6f19259b-4bc3-4df7-8a09-765794883524
2012-07-26 07:44:26 +00:00
ydong10 73c82041dc Fixed issues:
1.Refine the logic about show different attribute.
2.Refine the logic about allocate memory for variable name and data.

Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13558 6f19259b-4bc3-4df7-8a09-765794883524
2012-07-26 07:15:31 +00:00
ydong10 12ea46947d Roll back the change which caused build fail
Signed-off-by: Eric Dong <eric.dong@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13557 6f19259b-4bc3-4df7-8a09-765794883524
2012-07-26 05:42:43 +00:00
jcarsey 05916c1532 ShellPkg: Update string to number conversion to correctly stop at spaces if so requested.
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://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13548 6f19259b-4bc3-4df7-8a09-765794883524
2012-07-23 16:32:09 +00:00
ydong10 c6a7fef8ea Add logic to check the execution break flag before executing the next command in a script file.
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Jaben carsey <Jaben.carsey@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13547 6f19259b-4bc3-4df7-8a09-765794883524
2012-07-23 03:17:09 +00:00
jcarsey 2c46dd239b ShellPkg: update pci enumeration routine for platforms with multiple pci segments.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eugene Cohen eugene@hp.com
reviewed-by: jaben carsey <jaben.carsey@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13524 6f19259b-4bc3-4df7-8a09-765794883524
2012-07-11 19:08:40 +00:00
ydong10 9d8fa791f5 ShellPkg: Fix recursion when deleting all variables.
Signed-off-by: Dong Eric <eric.dong@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13484 6f19259b-4bc3-4df7-8a09-765794883524
2012-07-04 01:14:07 +00:00
jcarsey 60448d9b8d ShellPkg: Fix en-US characters that are outside the Basic Latin character set range
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://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13448 6f19259b-4bc3-4df7-8a09-765794883524
2012-06-12 17:22:19 +00:00
jcarsey 46cb4043a1 ShellPkg: Fix display of 64-bit BARs in PCI dump on 32-bit systems.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eugene Cohen eugene@hp.com
reviewed-by: jaben carsey jaben.carsey@intel.com

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13381 6f19259b-4bc3-4df7-8a09-765794883524
2012-05-30 17:38:23 +00:00
jcarsey 6398b08db2 ShellPkg: Enable Runtime DXE drivers to make use of Shell libraries with the expectation that the driver is responsible for ensuring that they are only called when boot services are present. Also adds a ShellCommandLib Depex for gEfiUnicodeCollation2ProtocolGuid to fix constructor crash when used by drivers.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eugene Cohen eugene@hp.com
reviewed-by: jaben carsey jaben.carsey@intel.com

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13380 6f19259b-4bc3-4df7-8a09-765794883524
2012-05-30 17:34:16 +00:00
jcarsey 41cf3e458b ShellPkg: Enable Ctrl-C characters to be processed over serial interfaces that do not pass control key modifiers (like SimpleTextInOutSerial)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eugene Cohen eugene@hp.com
reviewed-by: Jaben Carsey jaben.carsey@intel.com

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13349 6f19259b-4bc3-4df7-8a09-765794883524
2012-05-22 22:16:37 +00:00
ydong10 64c7a74917 Enable print error info when execute the application.
Signed-off-by: Eric Dong  <eric.dong@intel.com>
Reviewed-by: Jaben Carsey <Jaben.carsey@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13224 6f19259b-4bc3-4df7-8a09-765794883524
2012-04-27 01:47:35 +00:00
lzeng14 ea4fe84fe5 Update comments in DmpStore.c to be more suitable.
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13223 6f19259b-4bc3-4df7-8a09-765794883524
2012-04-27 01:18:41 +00:00
ydong10 8d3000031d Enhance code to more safely and follow coding style.
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Jaben Carsey <Jaben.carsey@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13221 6f19259b-4bc3-4df7-8a09-765794883524
2012-04-26 02:00:30 +00:00
hhtian bff8c6f61d Update copyright format
Signed-off-by: Hot Tian <hot.tian@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13213 6f19259b-4bc3-4df7-8a09-765794883524
2012-04-24 06:49:39 +00:00
lzeng14 035da677c8 Update IfConfig.c to use TPL_CALLBACK instead of TPL_CALLBACK - 1 to follow UEFI spec.
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Ting Ye <ting.ye@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13210 6f19259b-4bc3-4df7-8a09-765794883524
2012-04-24 02:41:33 +00:00
jcarsey 5559a41aad ShellPkg: hide flashing cursor during startup.
signed-off-by: jaben carsey <jaben.carsey@intel.com>
reviewed-by: erik bjorge <erik.c.bjorge@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13207 6f19259b-4bc3-4df7-8a09-765794883524
2012-04-23 18:00:41 +00:00
jcarsey 5513af68ed ShellPkg: removed memory leak.
removed unnecessary GetVariable call.

signed-off-by: jaben carsey <jaben.carsey@intel.com>
reviewed-by: erik bjorge <erik.c.bjorge@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13206 6f19259b-4bc3-4df7-8a09-765794883524
2012-04-23 17:58:15 +00:00
jljusten ea4ee7ac38 EDK II Packages: Add Contributions.txt and License.txt files
Contributions.txt documents the contribution process for all
tianocore projects. The conents of Contributions.txt should
match in all cases.

License.txt is a per-project document showing the license terms
used by that project.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13187 6f19259b-4bc3-4df7-8a09-765794883524
2012-04-11 23:19:46 +00:00
jcarsey 06c355b42f correct removal of commit 12951.
submitted-by: jaben.carsey@intel.com

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13141 6f19259b-4bc3-4df7-8a09-765794883524
2012-03-26 21:00:39 +00:00
lzeng14 187cb3dd8d Add SMBIOS 2.7.1 support to SmbiosView command.
Signed-off-by: lzeng14
Reviewed-by: jcarsey


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13101 6f19259b-4bc3-4df7-8a09-765794883524
2012-03-15 08:29:49 +00:00
rsun3 94020bb40f Improve robustness when scanning PCI Option ROM.
Signed-off-by: rsun3
Reviewed-by: geekboy15a


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13095 6f19259b-4bc3-4df7-8a09-765794883524
2012-03-14 03:17:17 +00:00
jcarsey 50b43b1506 ShellPkg: Fix ICC11 build failure.
Eliminate SHELL_STATUS and EFI_STATUS mismatch.

Signed-off-by: jcarsey
Reviewed-by: lgao4

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13075 6f19259b-4bc3-4df7-8a09-765794883524
2012-03-05 17:51:52 +00:00
jcarsey 287b4d32ee ShellPkg: Fix ICC11 build failure.
Signed-off-by: jcarsey
Reviewed-by: lgao4

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13032 6f19259b-4bc3-4df7-8a09-765794883524
2012-02-24 17:12:39 +00:00
jcarsey 74fa83fda6 ShellPkg: fix 'ls' handling of empty drives where there is not even an "." or ".." directory.
Signed-off-by: jcarsey
Reviewed-by: winddy_zhang@byosoft.com.cn

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12981 6f19259b-4bc3-4df7-8a09-765794883524
2012-02-02 16:55:30 +00:00
rsun3 3bbe68a362 Add Missing invocations to VA_END() for VA_START().
Signed-off-by: rsun3
Reviewed-by: lgao4

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12979 6f19259b-4bc3-4df7-8a09-765794883524
2012-02-01 06:06:08 +00:00
andrewfish 4641e70095 Fix type 19 print to match SBMIOS 2.7.
Note: Some one should port smbiosview to use the edk2 MdePkg/Include/IndustryStandard/SmBios.h and not carry it's own definitions, that are now out of date. 

signed-off-by:andrewfish



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12971 6f19259b-4bc3-4df7-8a09-765794883524
2012-01-31 00:18:25 +00:00
jcarsey eefe286b7b ShellPkg: Update 'echo' command to print everything at once. this allows for format color coding on the output.
signed-off-by: jcarsey
reviewed-by: darylm503

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12969 6f19259b-4bc3-4df7-8a09-765794883524
2012-01-30 22:48:33 +00:00
andrewfish 94753eb940 Fix clang compiler warning.
signed-off-by:andewfish
reviewed-by:jcarsey



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12968 6f19259b-4bc3-4df7-8a09-765794883524
2012-01-30 19:06:17 +00:00
jcarsey 8bb7441edd ShellPkg: Allow for format character strings to be typed in editor without having effect on editor screen.
signed-off-by: jcarsey
reviewed-by: leegrosenbaum

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12965 6f19259b-4bc3-4df7-8a09-765794883524
2012-01-30 18:44:41 +00:00
jcarsey 479f85bb72 ShellPkg: add more parenthesis to bcfg command.
signed-off-by: jcarsey
reviewed-by: mlmitchel

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12963 6f19259b-4bc3-4df7-8a09-765794883524
2012-01-30 17:31:23 +00:00
jcarsey f9aefb6a06 ShellPkg: fix redirection file parsing to allow spaces before filename.
signed-off-by: jcarsey
reviewed-by: darylm503

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12962 6f19259b-4bc3-4df7-8a09-765794883524
2012-01-27 20:51:14 +00:00
jcarsey cff7bffbb5 ShellPkg: Add support for adding optional data to the bcfg command in debug profile.
signed-off-by: jcarsey
reviewed-by: leegrosenbaum

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12961 6f19259b-4bc3-4df7-8a09-765794883524
2012-01-27 18:53:18 +00:00
jcarsey 49bd498dfe ShellPkg: parameters with spaces need quotes.
signed-off-by: jcarsey
reviewed-by: leegrosenbaum

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12960 6f19259b-4bc3-4df7-8a09-765794883524
2012-01-27 18:42:43 +00:00
jcarsey e1d996b391 ShellPkg: Add support for adding optional data to the bcfg command.
signed-off-by: jcarsey
reviewed-by: leegrosenbaum

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12959 6f19259b-4bc3-4df7-8a09-765794883524
2012-01-27 18:40:51 +00:00
jcarsey 28d903168c ShellPkg: This patch fixes the redirection support for a Shell2 application running in Shell1.
signed-off-by: Richard_Chan@Dell.com
reviewed-by: jcarsey

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12951 6f19259b-4bc3-4df7-8a09-765794883524
2012-01-20 21:58:15 +00:00
jcarsey a32980dd3c ShellPkg: Fix rm CWD protection to be better at catching similarly named directories.
signed-off-by: jcarsey
reviewed-by: geekboy15a

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12950 6f19259b-4bc3-4df7-8a09-765794883524
2012-01-20 18:10:45 +00:00
jcarsey ecfd71af17 ShellPkg: Fix SimpleTextInputEx based "CTRL-S" by emptying the buffer to prevent immediate release of the pause.
signed-off-by: jcarsey
reviewed-by: leegrosenbaum

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12944 6f19259b-4bc3-4df7-8a09-765794883524
2012-01-19 18:18:12 +00:00
jcarsey a7224eefeb ShellPkg: Check for Abort flag in main 'for' loop of ls command and propagate the condition when found.
Also prevents printing of an error output when user selects abort.

signed-off-by: jcarsey
reviewed-by: 

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12925 6f19259b-4bc3-4df7-8a09-765794883524
2012-01-11 18:45:23 +00:00
jcarsey f0b0e7338b ShellPkg: Propagate verbose flag down so it can be used in all DH command use cases.
signed-off-by: jcarsey
reviewed-by: leegrosenbaum

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12923 6f19259b-4bc3-4df7-8a09-765794883524
2012-01-10 20:53:26 +00:00
jcarsey f4f3c6bf0a ShellPkg: Add dump information for PCI Root Bridge IO protocol.
This indirectly updates the DH command since it will automatically call the new function.

signed-off-by: jcarsey
reviewed-by: leegrosenbaum

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12922 6f19259b-4bc3-4df7-8a09-765794883524
2012-01-10 20:51:04 +00:00
jcarsey dee3431846 ShellPkg: Add protocols / protocol GUIDs to display and input mapping.
This adds all protocols in the MdePkg.dec.

signed-off-by: jcarsey
reviewed-by: geekboy15a

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12920 6f19259b-4bc3-4df7-8a09-765794883524
2012-01-09 19:11:54 +00:00
jcarsey 344b16e151 ShellPkg: fix copyright date.
signed-off-by: jcarsey

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12911 6f19259b-4bc3-4df7-8a09-765794883524
2012-01-05 20:46:16 +00:00
jcarsey b471606bdf ShellPkg: fix For command parsing list of values.
Fix a check that was checking twice for double quote '"' and not for space ' '.

signed-off-by: jcarsey
reviewed-by: geekboy15a

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12910 6f19259b-4bc3-4df7-8a09-765794883524
2012-01-05 20:43:31 +00:00
jcarsey d8fdd5247c ShellPkg: Fix swapping of reset behavior.
This fix exchanges the behavior between "reset -c" and "reset" with "reset -w".

signed-off-by: jliu66
reviewed-by: jcarsey

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12909 6f19259b-4bc3-4df7-8a09-765794883524
2012-01-05 18:20:23 +00:00
jcarsey 8fcf74a850 ShellPkg: print error when column index is out of range instead of ASSERT.
signed-off-by: jcarsey
reviewed-by: leegrosenbaum

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12904 6f19259b-4bc3-4df7-8a09-765794883524
2012-01-02 21:17:20 +00:00
jcarsey 1921657354 ShellPkg: fix Pipe usage verification.
Add checks for nothing before or nothing after the pipe and output an error when pipe usage fails.

signed-off-by: jcarsey
reviewed-by: leegrosenbaum

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12903 6f19259b-4bc3-4df7-8a09-765794883524
2012-01-02 18:07:13 +00:00
geekboy15a b714ecb8db ShellPkg: Updated version number.
Signed-off-by: jcarsey
Reviewed-by: geekboy15a

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12849 6f19259b-4bc3-4df7-8a09-765794883524
2011-12-13 18:45:44 +00:00
jcarsey 8f04ca1a8f ShellPkg: Fix "-b" usage with timezone command.
signed-off-by: jcarsey
reviewed-by: geekboy15a

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12799 6f19259b-4bc3-4df7-8a09-765794883524
2011-11-29 21:46:53 +00:00
jcarsey 2e5c97edcd ShellPkg: Fix handling of empty files in Hexedit
Currently hexedit thinks all files that are non-existent (i.e. new) or empty must be a memory error since the pointer is checked, but the file size is not referenced.

Signed-off-by: jcarsey
Reviewed-by: jljusten

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12797 6f19259b-4bc3-4df7-8a09-765794883524
2011-11-29 15:37:04 +00:00
jcarsey 0d11446d51 ShellPkg: Updates the printing of echo for script commands to after the @ checking.
The add and remove are really a move of the code block from before the @ parsing into the else block.

Signed-off-by: jcarsey
Reviewed-by: leegrosenbaum

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12741 6f19259b-4bc3-4df7-8a09-765794883524
2011-11-18 18:58:25 +00:00
jcarsey 73c83c69c0 ShellPkg: Correct incorrect use of sizeof to use macro for EFI_FILE_INFO size.
Signed-off-by: jcarsey
Reviewed-by: niruiyu


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12740 6f19259b-4bc3-4df7-8a09-765794883524
2011-11-18 17:02:36 +00:00
jcarsey 2d3759d8b5 ShellPkg: Update the ‘for’ command to check number length correctly with trailing spaces.
This fix corrects the logic that checks number length such that is functions correctly without a trailing space.

Signed-off-by: jcarsey
Reviewed-by: geekboy15a



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12736 6f19259b-4bc3-4df7-8a09-765794883524
2011-11-17 21:38:20 +00:00
ydong10 37d5c6ee2f Update comment for function header.
Signed-off-by: ydong10

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12691 6f19259b-4bc3-4df7-8a09-765794883524
2011-11-14 08:51:05 +00:00
darylm503 b0934ac4b0 ShellPkg: Update comments for functions to clarify buffer origin.
Signed-off-by: darylm503
Reviewed-by: jljusten



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12687 6f19259b-4bc3-4df7-8a09-765794883524
2011-11-12 00:35:11 +00:00
jcarsey 031acf6336 Shellpkg: Add support for filenames with spaces.
This patch changes the file redirection support to allow for quote delimited filenames that contain spaces and updates the edit command to allow spaces in the filename.  This also properly fails for attempts to redirect to "" (empty quotes).

This was missing from the first portion of the commit.

signed-off-by: jcarsey
reviewed-by: jliu66



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12686 6f19259b-4bc3-4df7-8a09-765794883524
2011-11-11 16:52:09 +00:00
jcarsey d16efcae82 Shellpkg: Add support for filenames with spaces.
This patch changes the file redirection support to allow for quote delimited filenames that contain spaces and updates the edit command to allow spaces in the filename.  This also properly fails for attempts to redirect to "" (empty quotes).

signed-off-by: jcarsey
reviewed-by: jliu66



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12685 6f19259b-4bc3-4df7-8a09-765794883524
2011-11-11 16:45:19 +00:00
jcarsey 3372840669 ShellPkg: swap warm and cold to get the default correct for Reset command.
sighed-off-by: jcarsey
reviewed-by: gookboy15a

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12623 6f19259b-4bc3-4df7-8a09-765794883524
2011-11-01 20:05:11 +00:00
ydong10 96962f0ae4 Fix a typo when check the return value
Signed-off-by: ydong10
Reviewed-by: jcarsey

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12556 6f19259b-4bc3-4df7-8a09-765794883524
2011-10-22 04:10:30 +00:00
ydong10 d6c06dd776 Fix a code typo.
Signed-off-by: ydong10

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12543 6f19259b-4bc3-4df7-8a09-765794883524
2011-10-18 01:47:53 +00:00
jcarsey c8c2259156 ShellPkg: Add checking for memory allocation and pointer returns from functions.
signed-off-by: jcarsey
reviewed-by: lgrosenb

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12542 6f19259b-4bc3-4df7-8a09-765794883524
2011-10-17 17:49:21 +00:00
jcarsey 532691c8ba ShellPkg: Add checking for memory allocation and pointer returns from functions.
signed-off-by: jcarsey
reviewed-by: geekboy15a

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12540 6f19259b-4bc3-4df7-8a09-765794883524
2011-10-14 19:21:13 +00:00
jcarsey cf6a8f1453 ShellPkg: Set CRC value whenever changing a system table.
This adds a function (from DxeMain.c) that calculates and sets a CRC into a system table header and then calls the function in the 2 places where the shell changes the system table.

signed-off-by: jcarsey
reviewed-by: geekboy15a

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12536 6f19259b-4bc3-4df7-8a09-765794883524
2011-10-13 23:05:08 +00:00
jcarsey 7a95efda40 SShellPkg: updating order of cast and addressing of a pointer (2 identical places).
GCC build didn't like the original version.

sighed-off-by: jcarsey
reviewed-by: lgrosenb

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12535 6f19259b-4bc3-4df7-8a09-765794883524
2011-10-13 16:08:18 +00:00
ydong10 0c1950ba5e Check the pointer before use it to avoid potential access violation.
Signed-off-by: ydong10
Reviewed-by: jcarsey

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12533 6f19259b-4bc3-4df7-8a09-765794883524
2011-10-13 02:37:35 +00:00
jcarsey 4d10ab79d7 ShellPkg: Add checks for NULL pointers.
This adds lots of pointer verification with ASSERTs only used when the condition should be impossible and never for memory allocation.

signed-off-by: jcarsey
reviewed-by: geekboy15a


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12524 6f19259b-4bc3-4df7-8a09-765794883524
2011-10-10 20:36:44 +00:00
jcarsey ecae51177e ShellPkg: Add checks for NULL pointers.
This adds lots of pointer verification with ASSERTs only used when the condition should be impossible and never for memory allocation.

signed-off-by: jcarsey
reviewed-by: geekboy15a

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12523 6f19259b-4bc3-4df7-8a09-765794883524
2011-10-10 20:32:17 +00:00
jcarsey beab0fc5e2 ShellPkg: Verify memory allocations without ASSERT.
signed-off-by: jcarsey
reviewed-by: geekboy15a

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12522 6f19259b-4bc3-4df7-8a09-765794883524
2011-10-10 17:26:25 +00:00
sfu5 02a758cb0b Add pointer check for NULL before dereference it.
Signed-off-by: sfu5
Reviewed-by: xdu2
Reviewed-by: ydong10


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12514 6f19259b-4bc3-4df7-8a09-765794883524
2011-10-08 02:55:30 +00:00
lgao4 bca163ff11 Clean up the private GUID definition in module Level.
Signed-off-by: lgao4
Reviewed-by: jcarsey

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12394 6f19259b-4bc3-4df7-8a09-765794883524
2011-09-21 01:56:00 +00:00
jcarsey eca218a7ce ShellPkg: Verify DevicePathToText was successful before using the resultant pointer.
signed-off-by: jcarsey
reviewed-by: darylm503

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12393 6f19259b-4bc3-4df7-8a09-765794883524
2011-09-20 23:06:23 +00:00
jcarsey 1fc3749dad ShellPkg: fix support for "\" (or "\.") meaning root of drive.
Cp command fixed to allow for copying single or multiple files to the root of the drive with destination directory \.
Cd command fixed to allow for changing CWD to the root of the drive with destination directory \.

signed-off-by: jcarsey
reviewed-by: geekboy15a

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12392 6f19259b-4bc3-4df7-8a09-765794883524
2011-09-20 21:01:34 +00:00
ydong10 f62f07ee2c Refine code to follow coding style.
Signed-off-by: ydong10
Reviewed-by: jcarsey

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12383 6f19259b-4bc3-4df7-8a09-765794883524
2011-09-20 01:34:39 +00:00
jcarsey 7929788a24 ShellPkg: Update revision info.
signed-off-by: jcarsey

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12358 6f19259b-4bc3-4df7-8a09-765794883524
2011-09-15 22:24:09 +00:00
jcarsey f9125972ae ShellPkg: Fix concatenation on full device paths.
submitted-by: jcarsey
reviewed-by:  geekboy15a

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12357 6f19259b-4bc3-4df7-8a09-765794883524
2011-09-15 20:18:58 +00:00
jcarsey b6b22b132a ShellPkg: Eliminate loss of high bits in return value from exit command on 64 bit platform.
submitted-by: jcarsey
reviewed-by:  gookboy15a
reviewed-by:  niruiyu

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12356 6f19259b-4bc3-4df7-8a09-765794883524
2011-09-15 20:10:39 +00:00
jcarsey 0f87f732e9 ShellPkg: Add missing function descriptor comment.
Submitted-by: jcarsey


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12326 6f19259b-4bc3-4df7-8a09-765794883524
2011-09-12 15:34:11 +00:00
jcarsey 6a5aa4d6dc ShellPkg: Add 3 missing function declaration comments and change a function static variable to a file global variable.
Submitted-by: jcarsey
Reviewed-by:  geekboy15a
Reviewed-by:  ydong10

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12317 6f19259b-4bc3-4df7-8a09-765794883524
2011-09-09 16:57:26 +00:00
jcarsey a0cd353dd2 ShellPkg: allow for mm command to properly write PCIe in non-interactive mode.
Submitted-by: jcarsey
Reviewed-by: jljusten
Reviewed-by: marothma



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12299 6f19259b-4bc3-4df7-8a09-765794883524
2011-09-08 16:50:17 +00:00
ydong10 4ff7e37b4f Refine comments and two code style.
Signed-off-by: ydong10

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12263 6f19259b-4bc3-4df7-8a09-765794883524
2011-09-02 08:05:34 +00:00
jcarsey 5d46f17ba7 ShellPkg: fix ShellPrint-functions to allow for escape character to prevent attribute changes.
This allows for the editors to function easily.

signed-off-by: jcarsey
reviewed-by: kidzyoung

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12187 6f19259b-4bc3-4df7-8a09-765794883524
2011-08-23 15:34:23 +00:00
jcarsey d159ab9538 ShellPkg: fix build error when converting INTN to INT32.
signed-off-by: jcarsey
Reviewed-by: lgao4

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12186 6f19259b-4bc3-4df7-8a09-765794883524
2011-08-23 15:32:49 +00:00
jcarsey 382e78c09c ShellPkg: bug fix for edit search/replace function
* Fix the search bug: if word to be searched at the beginning of the line, it can not be found out.

Signed-off-by: kidzyoung
reviewed-by: jcarsey

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12116 6f19259b-4bc3-4df7-8a09-765794883524
2011-08-10 14:48:14 +00:00
jcarsey 848997b59a This adds support for @ prefixed commands in script files.
signed-off-by: jcarsey
reviewed-by: geekboy15a

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12113 6f19259b-4bc3-4df7-8a09-765794883524
2011-08-09 16:33:58 +00:00
jcarsey 573d7e468e remove CatSPrint from ShellPkg.
signed-off-by: jcarsey
reviewed-by: lgrosenb

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12100 6f19259b-4bc3-4df7-8a09-765794883524
2011-08-08 18:22:08 +00:00
jcarsey 1e2b43f1e2 ShellPkg: Added the Ctrl based hot key for hexedit
* Add Ctrl based hotkey alternatives to function hotkeys.
* Update help menu for hexedit.

Signed-off-by: kidzyoung
Reviewed-by: jljusten
Reviewed-by: jcarsey

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12082 6f19259b-4bc3-4df7-8a09-765794883524
2011-08-03 17:28:04 +00:00
jcarsey feccc28a6f cleanup function and eliminate build error.
submitted-by:jcarsey
reviewed-by: lgao4

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12069 6f19259b-4bc3-4df7-8a09-765794883524
2011-08-01 15:18:19 +00:00
jcarsey 5a2beb745f ShellPkg: Added the Ctrl based hot key and changed text editor's UI.
* Add Ctrl-E hotkey for help
* Add Ctrl based hotkey alternatives to function hotkeys
* Don't show hotkey help on the main screen
* Change the file buffer's row count for display to adjust the new screen format
* Change the edit status bar location, the new edit status bar is in the last line
* Change the location of the edit bar, the new edit input bar is in the last line

Signed-off-by: kidzyoung
reviewed-by: jcarsey
reviewed-by: jljusten
reviewed-by: jiang

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12036 6f19259b-4bc3-4df7-8a09-765794883524
2011-07-20 20:10:45 +00:00
jcarsey 5ddca3b91b fix issue about slashes on end of comment line.
signed-off-by:jcarsey

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12003 6f19259b-4bc3-4df7-8a09-765794883524
2011-07-11 14:32:34 +00:00
jcarsey 4d0a4fcefe Move the 2 functions associated with reading whole lines at a single time from the shell command (internal) library to the ShellLib (external) library.
signed-off-by: jcarsey
reviewed-by: lgrosenb

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12000 6f19259b-4bc3-4df7-8a09-765794883524
2011-07-06 22:28:36 +00:00
jcarsey ab94587a7d This refactors 3 functions out of ShellCommandLib and puts them into a new library (but as 2 functions instead of 3). This allows for users outside of the shell itself to have access to these functions.
1) Remove the 3 functions out of the shell's internal library (ShellCommandLib)
2) Add a new library class (PathLib)
3) Add an instance of this class (BasePathLib)
4) Change all internal shell callers to use this new library class.

signed-off-by: jcarsey
reviewed-by: jljusten

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11936 6f19259b-4bc3-4df7-8a09-765794883524
2011-06-30 22:58:53 +00:00
jcarsey f1518f6970 add fixes for code verification happyness.
signed-off-by: jcarsey
reviewed-by: jljusten

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11935 6f19259b-4bc3-4df7-8a09-765794883524
2011-06-30 22:25:46 +00:00
jcarsey 366f81a016 Clarify that the shared variables of the shell protocols are properly named.
This removes the non-shared gEfiShellProtocol and gEfiShellParametersProtocol and renames the shared version to those names.

This removes the m-versions of those protocol pointers.

signed-off-by: jcarsey
reviewed-by: darylm503

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11900 6f19259b-4bc3-4df7-8a09-765794883524
2011-06-27 21:04:22 +00:00
jcarsey 92a5447eda replace protocol presence ASSERTs with error returns.
signed-off-by: jcarsey
reviewed-by: lgrosenb

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11899 6f19259b-4bc3-4df7-8a09-765794883524
2011-06-27 20:33:13 +00:00
jcarsey ad7782a47e maintain output attributes.
signed-off-by: jcarsey
reviewed-by: lgrosenb

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11898 6f19259b-4bc3-4df7-8a09-765794883524
2011-06-27 20:29:23 +00:00
jcarsey 35f26e73cc replace assert with error.
signed-off-by: jcarsey
reviewed-by: lgrosenb

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11897 6f19259b-4bc3-4df7-8a09-765794883524
2011-06-27 20:28:23 +00:00
jcarsey 03131de30e Make sure size is correct.
signed-off-by: jcarsey
reviewed-by: lgrosenb

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11896 6f19259b-4bc3-4df7-8a09-765794883524
2011-06-27 20:27:29 +00:00
jcarsey 8bd282bee9 allow for failure return when called without a shell present.
signed-off-by: jcarsey
reviewed-by: lgrosenb

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11894 6f19259b-4bc3-4df7-8a09-765794883524
2011-06-27 16:45:41 +00:00
ydong10 72c8a89a65 Add check code to avoid access violation.
Signed-off-by: ydong10
Reviewed-by: jcarsey


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11873 6f19259b-4bc3-4df7-8a09-765794883524
2011-06-23 01:26:06 +00:00
jcarsey a9ca068447 restore original information when redirection fails inside a command using the split operator (|).
Signed-off-by: jcarsey
Reviewed-by: darylm503


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11831 6f19259b-4bc3-4df7-8a09-765794883524
2011-06-15 22:25:14 +00:00
mdkinney e118a40b9d Add ABS() macro (Absolute Value) to Base.h in MdePkg
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11819 6f19259b-4bc3-4df7-8a09-765794883524
2011-06-13 20:26:03 +00:00
ydong10 cd8462ea9d Check the buffer allocation result before using it.
Signed-off-by:ydong10
Reviewed-by:jljusten


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11811 6f19259b-4bc3-4df7-8a09-765794883524
2011-06-13 01:44:03 +00:00
jcarsey 420462d0fb remove empty sections in INF files.
signed-off-by: jcarsey
reviewed-by: darylm503

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11769 6f19259b-4bc3-4df7-8a09-765794883524
2011-06-08 18:28:03 +00:00
hhtian 6f18b50d02 update copyright line format
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11759 6f19259b-4bc3-4df7-8a09-765794883524
2011-06-07 08:08:19 +00:00
jcarsey ae69c04736 Verify that Status variable is initialized.
submitted-by: jcarsey
reviewed-by: lgrosenb
reviewed-by: rhale

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11752 6f19259b-4bc3-4df7-8a09-765794883524
2011-06-03 15:51:26 +00:00
andrewfish a7a394a483 Make shell not ASSERT on older versions of EFI. On a Mac if you soft load Hii, DevicePathToText, and ComponentName drivers from edk2, then with this patch the new Shell will run.
Reviewed by: jcarsey



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11719 6f19259b-4bc3-4df7-8a09-765794883524
2011-06-01 02:27:02 +00:00