Commit Graph

525 Commits

Author SHA1 Message Date
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
Brendan Jackman 0477054bc0 ShellPkg: Fixed Memory leak in UefiMain()
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@15221 6f19259b-4bc3-4df7-8a09-765794883524
2014-02-11 22:42:49 +00:00
Brendan Jackman 23385d6319 ShellPkg: Manually parse parameters
We can't use ShellCommandLineParse as it would error out when the shell was
called with args like "cp -r foo bar", because "-r" is not a recognised shell
option

A different way to avoid some of this manual parsing would be to prepend '^' to
each argument, but that would still require the degree of parsing necessary to work
out which words are part of the command and which are shell options.

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@15220 6f19259b-4bc3-4df7-8a09-765794883524
2014-02-11 22:39:49 +00:00
Jaben Carsey 1eb5cf94a1 ShellPkg: Prevent "set" command from updating %lasterror%
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <Jaben.Carsey@intel.com>
reviewed-by: Laurie Jarlstrom <laurie.jarlstrom@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15219 6f19259b-4bc3-4df7-8a09-765794883524
2014-02-11 20:36:05 +00:00
Leandro G. Biss Becker 5b05611330 ShellPkg: patch to the "for" command when used with "in" iterating files in a folder. (for %x in *.txt). The result values (%x) have misplaced quotation marks and some spaces.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Leandro G. Biss Becker <lbecker@positivo.com.br>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15212 6f19259b-4bc3-4df7-8a09-765794883524
2014-02-05 21:16:47 +00:00
Shumin Qiu 71c49eafc5 Add initializing code for local variable 'CalleeExitStatus' and 'ExitStatus' in 'Shell.c'.
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@15191 6f19259b-4bc3-4df7-8a09-765794883524
2014-01-28 00:59:46 +00:00
Shumin Qiu 7bc3ec3d80 1. Fix several comments in function headers for 'ShellProtocol.c', 'ShellProtocol.h' and 'Ls.c'. 2. Remove the initialization of variable 'CalleeExitStatus' in function 'RunScriptFileHandle' of 'Shell.c' from its declarartion.
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@15190 6f19259b-4bc3-4df7-8a09-765794883524
2014-01-28 00:37:11 +00:00
Brendan Jackman 6ddc2ff3ef ShellPkg/ShellProtocol.c: Don't put consective "\"s in file paths
The UEFI and UEFI Shell specs do not allow consecutive path separators.

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@15184 6f19259b-4bc3-4df7-8a09-765794883524
2014-01-24 22:32:38 +00:00
Brendan Jackman 3877d0f581 ShellPkg/UefiShellLib.c: Execute: Return a Command status even in the old shell
This means we can use ShellExecute without thinking which shell
environment is in use. However it still isn't ideal: if
mEfiShellEnvironment2->Execute returns EFI_INVALID_PARAMETER, we can't tell
whether Execute() received an invalid parameter (e.g. ParentImageHandle was
NULL), or whether we tried to execute a command with an invalid parameter
(for example CommandLine "ls -hurdygurdy").

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@15183 6f19259b-4bc3-4df7-8a09-765794883524
2014-01-24 22:31:07 +00:00
Brendan Jackman 708793148d ShellLib/UefiShellLib.c: Fix doc comment for ShellOpenFileMetaArg
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@15182 6f19259b-4bc3-4df7-8a09-765794883524
2014-01-24 22:29:53 +00:00
Brendan Jackman d9c7741d4f ShellPkg/ShellProtocol.c: Don't overwrite Status in InternalShellExecuteDevicePath
Due to the ASSERT_EFI_ERROR, this patch is necessary only to ensure specified
behaviour in RELEASE builds.

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@15181 6f19259b-4bc3-4df7-8a09-765794883524
2014-01-24 22:28:36 +00:00
Brendan Jackman 5223c12135 ShellPkg/Shell: Fix reporting of exit status in ShellProtocol.Execute
When the exit status of the command run by the shell is other than
SHELL_SUCCESS, the shell image will now exit with EFI_ABORTED, placing the
commands exit status (which is a SHELL_STATUS) in ExitData.

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@15180 6f19259b-4bc3-4df7-8a09-765794883524
2014-01-24 22:27:11 +00:00
Jaben Carsey fed3be946c ShellPkg: Refactor Print logic out of main loop function
This has no change in the behavior of the LS command, but it removes the printing logic from the main recursive function.  This is the first step toward changing the code flow without affecting the look and feel.

The long term goal is correcting the recursion to be more clean and useful to users.

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@15179 6f19259b-4bc3-4df7-8a09-765794883524
2014-01-24 20:33:17 +00:00
Shumin Qiu 14868afbb8 Update prints of variable attributes from 'RS' to 'RT' for 'Dmpstore' command.
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@15164 6f19259b-4bc3-4df7-8a09-765794883524
2014-01-23 00:29:53 +00:00
Shumin Qiu f614ce7ebb Update the comments in function headers to follow Doxygen special documentation blocks in section 2.3.5.
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@15163 6f19259b-4bc3-4df7-8a09-765794883524
2014-01-23 00:27:52 +00:00
Tian, Hot d42aab6e61 Fix CRLF format
Signed-off-by: Tian, Hot <hot.tian@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15160 6f19259b-4bc3-4df7-8a09-765794883524
2014-01-22 08:40:29 +00:00
Jaben Carsey 2c86b6b785 ShellPkg: Change StdIn redirection
This changes how StdIn redirection works such that the file is opened and parsed for length up front and not each time.  This prevents TPL issues.

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@15140 6f19259b-4bc3-4df7-8a09-765794883524
2014-01-17 17:51:09 +00:00
Jaben Carsey 4dd8c7af19 ShellPkg: Return the failure
This change returns the error code when they keyboard fails to read instead of potentially spinning endlessly.

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@15135 6f19259b-4bc3-4df7-8a09-765794883524
2014-01-16 16:53:56 +00:00
Jaben Carsey 8e4a89a335 ShellPkg: Remove ASSERT
This change removes ASSERT statements and replaces them with logic to break out of the loop.  This both prevents spinning forever and prevents processing the returned data from the function that failed.

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@15134 6f19259b-4bc3-4df7-8a09-765794883524
2014-01-16 16:53:23 +00:00
Jaben Carsey 31b018a663 ShellPkg: Remove ASSERT
This change removes ASSERT statements and replaces them with logic to break out of the loop.  This both prevents spinning forever and prevents processing the returned data from the function that failed.

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@15133 6f19259b-4bc3-4df7-8a09-765794883524
2014-01-16 16:52:39 +00:00
Shumin Qiu 5511b319f2 1. Change the implementation of function 'LoadVariableFromFile' to return SHELL_STATUS. 2. Add code to check whether the pointer 'FoundVarName' in 'DmpStore.c' is NULL before used.
Signed-off-by: Shumin Qiu <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@15112 6f19259b-4bc3-4df7-8a09-765794883524
2014-01-14 07:30:50 +00:00
Jaben Carsey 49bb76ff71 ShellPkg: Remove UNICODE file tag (FEFF) from files used for input redirection
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@15109 6f19259b-4bc3-4df7-8a09-765794883524
2014-01-13 18:52:48 +00:00
Olivier Martin 8da53ddd3b ShellPkg: remove unreachable break statements
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@15108 6f19259b-4bc3-4df7-8a09-765794883524
2014-01-13 18:52:12 +00:00
Jaben Carsey 8844288c4e ShellPkg: assign pointer to NULL after free to prevent double free
Since the API caller may call twice we need to make sure that we set pointer to NULL so we can tell if already free.

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@15107 6f19259b-4bc3-4df7-8a09-765794883524
2014-01-13 18:47:18 +00:00
Jaben Carsey e958b94662 ShellPkg: Fix command line parsing for script files (%1, %1, etc...)
This change makes sure that all script files get their command lines properly parsed for use in the script file.

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@15103 6f19259b-4bc3-4df7-8a09-765794883524
2014-01-13 07:30:08 +00:00
Shumin Qiu 483b86b918 Set the type of return value from function 'LoadVariablesFromFile' in 'DmpStore.c' to match the type of 'ShellStatus'.
Signed-off-by: Shumin Qiu <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@15102 6f19259b-4bc3-4df7-8a09-765794883524
2014-01-13 07:28:01 +00:00
Jaben Carsey 9f7f0697b7 ShellPkg: add the last PCIe extended capability decodings
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@15097 6f19259b-4bc3-4df7-8a09-765794883524
2014-01-10 22:34:13 +00:00
Jaben Carsey 75a5e2ef4e ShellPkg: remove potential memory leak with new apps on old shell
This pointer never gets free when running new apps on the old shell.

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@15095 6f19259b-4bc3-4df7-8a09-765794883524
2014-01-10 16:42:45 +00:00
Jaben Carsey 012305d551 ShellPkg: remove double free operation
This pointer gets free twice and this does not work.

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@15094 6f19259b-4bc3-4df7-8a09-765794883524
2014-01-10 16:41:54 +00:00
Ruiyu Ni 7e63fc9de9 Add the feature "dmpstore -l" and "dmpstore -s".
The file format is as below:
<File> := <Variable>+
<Variable> := <Name-Size> <Data-Size> <Name> <GUID> <Attributes> <Data> <Crc32>

Each variable representation in the file has a CRC32 value which can provide a mechanism to detect the file modification.
When any CRC32 is incorrect, dmpstore rejects to load the variables from the file.

Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15083 6f19259b-4bc3-4df7-8a09-765794883524
2014-01-10 01:52:24 +00:00
Jaben Carsey 4f67c7ffa1 ShellPkg: remove memory leak in file handle list
The shell was not freeing sufficient memory when freeing a list of files.  The structure contained a pointer which was being left behind.  I made a new function to replace the shared freeing function which frees the “Path” member of the SHELL_COMMAND_FILE_HANDLE structure.

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@15073 6f19259b-4bc3-4df7-8a09-765794883524
2014-01-09 18:05:24 +00:00
Jaben Carsey 4922715d85 ShellPkg: Fix NSH parsing
This skips lines in NSH files that are completely comments.  This reduces the memory overhead and the later processing.

This also frees memory correctly when a second memory allocation fails.

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@15072 6f19259b-4bc3-4df7-8a09-765794883524
2014-01-09 18:02:26 +00:00
Jaben Carsey c1f9c34621 ShellPkg: Remove memory leak from file list usage
This change removes an un-used parameter that was then causing a leak since the memory was assumed to be used.

This also verifies that the list is freed when no longer needed.

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@15071 6f19259b-4bc3-4df7-8a09-765794883524
2014-01-09 17:59:46 +00:00
Jaben Carsey 705bffb568 ShellPkg: Add more output to PCI command for extended configuration.
there is a new non-spec parameter "-_e" which allows additional information output to be controlled.

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@15070 6f19259b-4bc3-4df7-8a09-765794883524
2014-01-09 16:54:13 +00:00
Shumin Qiu 03bc7c2b09 Add code to check whether the pointer 'NewBuffer' in 'FileHandelWrappers.c' and the pointer 'FoundVarName' in 'Dmpstore.c' are NULL before used.
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@15060 6f19259b-4bc3-4df7-8a09-765794883524
2014-01-09 00:30:27 +00:00
Ruiyu Ni 31c2a2c7c0 Enhance Shell 2.0 to not depend on keyboard driver implementation to fix the "CTRL+s" pause malfunction issue.
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@15052 6f19259b-4bc3-4df7-8a09-765794883524
2014-01-07 02:23:10 +00:00
Shumin Qiu de4ebdcfcd Add the comment for function 'IsValidSplit' in 'Shell.c'. Add code to check whether pointer 'DataBuffer' in 'DmpStore.c' is NULL before used.
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@15051 6f19259b-4bc3-4df7-8a09-765794883524
2014-01-07 01:51:08 +00:00
Shumin Qiu 3e108dfd7d Set the type of variable 'StatusCode' as SHELL_STATUS to match the parameter type of function 'SetLastError'.
Signed-off-by: Shumin Qiu <shumin.qiu@intel.com>
Reviewed-by: Gao, Liming <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15031 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-31 04:01:17 +00:00
Shumin Qiu 5142926433 Fix ECC errors:1.Update the comments in function headers to follow the Doxygen special documentation. 2.Make the first line of text in a comment block end with a period. 3.Update the member variable name for SHELL_OPERATION_TYPES to follow the rules "Must contain lower case characters". 4. Return type of a function should exist and in the first line.
Signed-off-by: Shumin Qiu <shumin.qiu@intel.com>
Reviewed-by: Dong, Eric <eric.dong@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15019 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-25 00:55:33 +00:00
Laszlo Ersek 6fa0da7d52 Add default way for switch in function 'RunCommandOrFile' of 'Shell.c'.
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Shumin Qiu <shumin.qiu@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15018 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-24 07:25:31 +00:00
Jaben Carsey 5bd12b0555 ShellPkg: fix DmpStore for deleting
This change allows DmpStore command to delete all variables whereas before it would stop after a single deletion due to looping errors.  It uses a recursive function and deletes the last item returned from GetNextVariableName() first and then goes "backwards" to the first items.  

This can't delete authenticated 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>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15014 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-20 22:33:01 +00:00
Jaben Carsey 6bd644638d ShellPkg: pre-verify split commands
This makes sure that all parts of commands split via pipe operation are valid before starting.

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@15011 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-20 01:13:36 +00:00
Jaben Carsey 12a27a6d81 ShellPkg: API name typo.
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@15010 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-19 22:09:17 +00:00
Jaben Carsey 404b3f4394 ShellPkg: fix whitespace character trimming
This makes TrimSpaces() trim tab characters off the end of the string also (not just the beginning).  Also updates loop to prevent buffer underrun.

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@15009 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-19 22:03:37 +00:00
Jaben Carsey e3eb7d825a ShellPkg: CTRL-C stops a running script at the same time
This makes CTRL-C stop a running script after trying to stop the command.  And adds comments to describe the behavior more clearly.

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@15008 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-19 21:55:13 +00:00
Jaben Carsey 806c49db05 ShellPkg: Refactor the RunCommand API
This almost completely splits the RunCommand API into sub-routines.

 - the ProcessCommandLineToFinal API handles replacing the a found alias and any found environment variables.  This will redirect "-?" to "help", if necessary.  Upon return, the command line is complete and finalized.  It may still have redirection in it, and those will get chopped off later (but no further modifications occur).
 - the SetupAndRunCommandOrFile API handles updating and then later restoring StdIn, StdOut, and StdErr (and removing their information from the command line).  It will call into RunCommandOrFile.
 - the RunCommandOrFile API divides the logic to RunInternalCommand, RunScriptFile, or running an .EFI file directly.
 - the RunInternalCommand API handles updating and then restoring Argc and Argv.  It will run the internal command in between.
 - the SetLastError API handles updating of the environment variable "lasterror"
 - the DoHelpUpdateArgcArgv was changed to DoHelpUpdate and now works on the raw command line and not the argc/argv.  This allows the processing to be moved earlier.

Note this change has the following positive side effects (this eliminates unnecessary step):
 - Argc/Argv are only updated for internal commands (as they are library based)
 - no Argv/Argc/StdIn/StdOut/StdErr processing is done for file system changes.
 - The ProcessCommandLineToFinal API exists and it's critical to the ability to correctly pre-process split ("|") command lines ahead of time to verify their correctness.

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@15007 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-19 16:05:34 +00:00
Shumin Qiu 8dcd84b9d7 Converse the return value from 'int' to 'BOOLEAN' for function ‘ContainsSplit’ in Shell.c.
Signed-off-by: Shumin Qiu <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@15006 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-19 02:03:42 +00:00
Ruiyu Ni d4468cdf14 Rollback the change to EFI_BOOT_KEY_DATA structure since UEFI Spec adds the clarification that bitfields are ordered such that bit 0 is the least significant bit.
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15000 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-18 05:51:22 +00:00
Jaben Carsey e7831c9070 ShellPkg: Add missing function header comments
I found that some function headers had insufficient/incorrect 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://svn.code.sf.net/p/edk2/code/trunk/edk2@14998 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-17 22:23:05 +00:00
Jaben Carsey c81863953f ShellPkg: Fix "for" command statement initialization.
The shell was failing to correctly parse up to the space only for “run (1 3)” and also losing the space for “in ” a b” c” for loop initialization.  This fixes for initialization to be correct.

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@14997 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-17 21:40:41 +00:00
Shumin Qiu c6cef63532 Update code to ensure the pointer ‘CurrentName’ in function ‘PerformSingleMappingDisplay’ isn’t null before being processed.
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@14990 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-17 01:04:38 +00:00
Shumin Qiu 6f05676ddd Add a new line to initialize the variable “PassThruProtocol” in ConsoleWrapers.c to ensure the initialization not to be a part of its declaration.
Signed-off-by: Shumin Qiu <shumin.qiu@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14989 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-16 01:53:11 +00:00
Jaben Carsey cc31ac1e40 ShellPkg: add error messages into function
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@14986 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-13 23:53:59 +00:00
Jaben Carsey 5a5eb8069c ShellPkg: Refactor updating command line for help use
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@14985 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-13 21:58:51 +00:00
Jaben Carsey daf705847f ShellPkg: Refactor change to current file system
This moves the initialization for handling file system changes into a separate function.

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@14983 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-13 18:45:43 +00:00
Jaben Carsey 680db51153 ShellPkg: Refactor Split/Pipe based command lines
This moves the initialization for handling command lines with pipe ‘|’ into a separate function.

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@14982 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-13 18:18:27 +00:00
Jaben Carsey 6ba2921da3 ShellPkg: add API for determining operation type
There are no callers for this new API yet.  They will be added in the next commits.

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@14975 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-13 00:13:59 +00:00
Jaben Carsey 1ef61d0390 ShellPkg: Refactor Variable replacement into separate function
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@14974 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-12 21:44:23 +00:00
Jaben Carsey ca53c0af00 ShellPkg: Refactor Alias replacement into separate function
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@14973 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-12 21:16:38 +00:00
Jaben Carsey ad2bc85412 ShellPkg: refactor out leading and trailing space trimming
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@14972 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-12 18:42:18 +00:00
Jaben Carsey 321a8d494f ShellPkg: typo in the last commit.
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@14971 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-12 17:55:37 +00:00
Jaben Carsey 518c8cdc5c ShellPkg: Refactor out the searching for pipe characters
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@14969 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-12 17:27:27 +00:00
Jaben Carsey 19a4497259 ShellPkg: Refactor Pipe handling
This moves some logic for handling command lines with pipe ‘|’ into a separate function.

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@14958 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-10 18:41:35 +00:00
Jaben Carsey 3520e03f3d ShellPkg: Remove invalid ASSERT
There was an assumption that this API would never fail.  That is not true and the return value is checked just a few lines later.

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@14951 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-09 23:00:21 +00:00
Jaben Carsey 194ae48dae ShellPkg: Add support for CTRL-C within shell user prompting
This allows for the user to get out of answering a question with CTRL-C

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@14950 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-09 22:55:13 +00:00
Shumin Qiu 42f75495f3 Follow Shell specification to make sure the “command.man” file is always used no matter “command.efi -?” or “command -?” is typed.
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@14947 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-09 02:24:39 +00:00
Chris Phillips 6855763eb2 ShellPkg: Fix pci command to parse seg, bus, dev, and func arguments as hex
- Added STR_GEN_PARAM_INV_HEX string

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@14926 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-02 21:45:28 +00:00
Jaben Carsey ed8b529782 ShellPkg: Unregister all registrations
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@14925 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-02 19:27:45 +00:00
Jaben Carsey 74b0fb8c87 ShellPkg: Add ShellHexStrToUintn to allow for simple conversion of hex numbers.
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@14893 6f19259b-4bc3-4df7-8a09-765794883524
2013-11-22 21:37:34 +00:00
Chris Phillips 541ddf4436 ShellPkg: Fix pci command output of Max and Current Link Speed, and ASPM Support values to match PCIe Base Spec rev 3.0
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@14892 6f19259b-4bc3-4df7-8a09-765794883524
2013-11-22 21:17:25 +00:00