]> git.proxmox.com Git - mirror_edk2.git/commit - ShellPkg/Library/UefiShellLib/UefiShellLib.c
ShellPkg: Follow spec to remove the last '\' char in return name of GetCurDir().
authorQiu Shumin <shumin.qiu@intel.com>
Fri, 23 Oct 2015 02:03:20 +0000 (02:03 +0000)
committershenshushi <shenshushi@Edk2>
Fri, 23 Oct 2015 02:03:20 +0000 (02:03 +0000)
commitfbd2dfadfe6fb16ab7b49fca3764e05e65d97b8a
tree62be65e0eb87049beeb36b8ac95c2f127ce13c72
parenta7e173b07a1ef336fc8d753cf85ae8473e92365a
ShellPkg: Follow spec to remove the last '\' char in return name of GetCurDir().

In Shell spec 2.1 the return name of EFI_SHELL_PROTOCOL.GetCurDir() is defined as 'fs0:\current-dir' while in current implementation it's 'fs0:\current-dir\'.
To follow spec the patch removed the redundant '\' char.

Since it has been broken for a long time, some codes may depend on the broken behavior.
After this change 'EFI_SHELL_PROTOCOL.GetCurDir()' and 'UefiShellLib.ShellGetCurrentDir()'
will return a current directory string without tailing '\' (fs0:\current-dir), the value of Shell environment variable 'cwd' will become 'fs0:\current-dir' as well.

This patch has updated all the code in EDKII to make them depend on the new behavior.
Developers should check whether 'GetCurDir()' and 'ShellGetCurrentDir' are used in their source code.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18653 6f19259b-4bc3-4df7-8a09-765794883524
12 files changed:
ShellPkg/Application/Shell/FileHandleWrappers.c
ShellPkg/Application/Shell/Shell.uni
ShellPkg/Application/Shell/ShellProtocol.c
ShellPkg/Include/Library/ShellLib.h
ShellPkg/Include/Protocol/EfiShell.h
ShellPkg/Library/UefiShellLevel2CommandsLib/Cd.c
ShellPkg/Library/UefiShellLevel2CommandsLib/Cp.c
ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c
ShellPkg/Library/UefiShellLevel2CommandsLib/Mv.c
ShellPkg/Library/UefiShellLevel2CommandsLib/Rm.c
ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.c
ShellPkg/Library/UefiShellLib/UefiShellLib.c