History log of /device/linaro/bootloader/edk2/ShellPkg/Application/Shell/FileHandleWrappers.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
fbd2dfadfe6fb16ab7b49fca3764e05e65d97b8a 23-Oct-2015 Qiu Shumin <shumin.qiu@intel.com> 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
/device/linaro/bootloader/edk2/ShellPkg/Application/Shell/FileHandleWrappers.c
48cb33ec30c1b38664ed6b541c4ab61d6226d84b 15-Oct-2015 Qiu Shumin <shumin.qiu@intel.com> ShellPkg: Fix ASCII input redirection does not work correctly.

When executing 'ls -b <a arg.txt' Shell cannot get the ASCII char in 'arg.txt' correctly.
This patch updates the file read buffer size when read from ASCII file to fix the bug.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Signed-off-by: Felix Poludov <Felixp@ami.com>
Signed-off-by: Oleksiy Yakovlev <Oleksiyy@ami.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18609 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/ShellPkg/Application/Shell/FileHandleWrappers.c
4dc0d578b8b923672657956d3b1831c3cbf126ef 09-Jul-2015 Qiu Shumin <shumin.qiu@intel.com> ShellPkg: Refine code to use Strn**S safe functions instead of Str**S ones in some cases.

Safe string functions may ASSERT when the source length is larger than the MaxDest. This patch use Strn**S to indicate the copy length.

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

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17894 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/ShellPkg/Application/Shell/FileHandleWrappers.c
6956ecfe1e70f241f2a861520568bd1c6639ba54 30-Jun-2015 Qiu Shumin <shumin.qiu@intel.com> ShellPkg: Refine code to make catenae length more precise.

This commit refine the catenae length. A too long catenae length in StrnCat may cause potential buffer overflow while in StrnCatS it may ASSERT.

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

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17747 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/ShellPkg/Application/Shell/FileHandleWrappers.c
e75390f02971bcd4d67a9696508050bee4936a01 30-Jun-2015 Qiu Shumin <shumin.qiu@intel.com> ShellPkg: Use safe string functions to refine code.

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


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17730 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/ShellPkg/Application/Shell/FileHandleWrappers.c
c011b6c9e2baf57fc0557117e9875ceb3dca55a3 04-Feb-2015 Tapan Shah <tapandshah@hp.com> ShellPkg: Standardized HP Copyright Message String

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

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16759 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/ShellPkg/Application/Shell/FileHandleWrappers.c
323d3d111843cb4fbdf4f9918f72d305e63bc091 10-Sep-2014 Qiu Shumin <shumin.qiu@intel.com> ShellPkg: Replace the usage of StrnCpy with CopyMem to avoid potential buffer overflow and refine the code style.

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


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16083 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/ShellPkg/Application/Shell/FileHandleWrappers.c
7f79b01e8ef43901785dbccc1f4676cdf9a53d31 02-Sep-2014 Jaben Carsey <jaben.carsey@intel.com> ShellPkg: Refactor string manipulation

This patch replaces StrCpy with StrnCpy or refactors out the usage of StrCpy through some other means.
This patch replaces StrCat with StrnCat or refactors out the usage of StrCat through some other means.


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

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16038 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/ShellPkg/Application/Shell/FileHandleWrappers.c
4dd8c7af196bae9d27d82b9dbb8692dde66c3a10 16-Jan-2014 Jaben Carsey <jaben.carsey@intel.com> 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
/device/linaro/bootloader/edk2/ShellPkg/Application/Shell/FileHandleWrappers.c
03bc7c2b09c6f36930a5138c7727c0c4048539a7 09-Jan-2014 Shumin Qiu <shumin.qiu@intel.com> 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
/device/linaro/bootloader/edk2/ShellPkg/Application/Shell/FileHandleWrappers.c
416a423f0815b2ad2bd8dc1ceae7d306253462de 22-Nov-2013 Chris Phillips <chrisp@hp.com> 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
/device/linaro/bootloader/edk2/ShellPkg/Application/Shell/FileHandleWrappers.c
ecae51177e83db0d99f8b4888ae4b866c18651b6 10-Oct-2011 jcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524> 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
/device/linaro/bootloader/edk2/ShellPkg/Application/Shell/FileHandleWrappers.c
4ff7e37b4f7e336a8ecb7080b8f48eef4b52d396 02-Sep-2011 ydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524> 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
/device/linaro/bootloader/edk2/ShellPkg/Application/Shell/FileHandleWrappers.c
ab94587a7d2cd89695f9190420daceae0d2b7446 01-Jul-2011 jcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524> 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
/device/linaro/bootloader/edk2/ShellPkg/Application/Shell/FileHandleWrappers.c
a49f6a2f7e0d0141519c136905ce70038573ce40 15-Apr-2011 jcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524> fix for word wrapping.
fix for SimpleTextInEx callbacks.
remove an ASSERT.
fix for -noconsolein parameter.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11544 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/ShellPkg/Application/Shell/FileHandleWrappers.c
ae724571beb0cff6edefe42942b7cdc7aa81ee94 02-Apr-2011 jcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524> Comment's added and fixed.

Pointer's checked for NULL before access and after memory allocations.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11499 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/ShellPkg/Application/Shell/FileHandleWrappers.c
733f138d84a25a5993bc32ffe016c364daba686c 25-Mar-2011 jcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524> console logger - support disabling the console out.
console wrapper - comment fixes.
file handle wrappers - allow for creation of layers of file interfaces to automatically convert ASCII to UCS-2.
shell - add CTRL-S support and change how searching for startup.nsh.
shellenvvar - zero the memory allocations.
shall man parser - input verification on the help text.
shellparameters protocol - input redirection verification enhanced, leave ^ behind when not used.
shell protocol - remove ASSERTs, fixed GetDeviceName, allow mapping of BlockIO devices, and enhanced key monitoring for CTRL-S (now CTRL-S and CTRL-C).

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11440 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/ShellPkg/Application/Shell/FileHandleWrappers.c
3c865f2064d37eaccd1693b878596d5138b0b38e 04-Oct-2010 jcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524> 1) Removing ASSERTs for proper return values.
2) Verifying that memory allocations were successful.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10904 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/ShellPkg/Application/Shell/FileHandleWrappers.c
a405b86d274d32b92f69842bfb9a1ab143128f57 14-Sep-2010 jcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524> udk2010.up2.shell initial release.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10874 6f19259b-4bc3-4df7-8a09-765794883524
/device/linaro/bootloader/edk2/ShellPkg/Application/Shell/FileHandleWrappers.c