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: svn://svn.code.sf.net/p/edk2/code/trunk/edk2/ShellPkg@15179 6f19259b-4bc3-4df7-8a09-765794883524
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: svn://svn.code.sf.net/p/edk2/code/trunk/edk2/ShellPkg@15180 6f19259b-4bc3-4df7-8a09-765794883524
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: svn://svn.code.sf.net/p/edk2/code/trunk/edk2/ShellPkg@15181 6f19259b-4bc3-4df7-8a09-765794883524
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: svn://svn.code.sf.net/p/edk2/code/trunk/edk2/ShellPkg@15182 6f19259b-4bc3-4df7-8a09-765794883524
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: svn://svn.code.sf.net/p/edk2/code/trunk/edk2/ShellPkg@15183 6f19259b-4bc3-4df7-8a09-765794883524
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: svn://svn.code.sf.net/p/edk2/code/trunk/edk2/ShellPkg@15184 6f19259b-4bc3-4df7-8a09-765794883524