summaryrefslogtreecommitdiff
path: root/ShellPkg/Application/Shell/ShellParametersProtocol.c
AgeCommit message (Collapse)Author
2014-07-31ShellPkg: UpdateStdInStdOutStdErr(): append BOM to new unicode fileLaszlo Ersek
The >> operator redirects stdout to a file, using append mode and unicode encoding. Write the BOM when redirection happens to a new file (which starts out empty). This makes the >> operator behave similarly to the > operator, when the redirection target doesn't exist originally: OutUnicode && OutAppend && FileSize == 0 // >> to new unicode file vs. OutUnicode && !OutAppend // > to any unicode file (Note that (FileSize == 0) is equivalent to "new file" in this context, due to the earlier "Check that filetypes (Unicode/Ascii) do not change during an append".) Reported-by: Lowell Dennis <Lowell_Dennis@Dell.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jaben Carsey <Jaben.carsey@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15725 6f19259b-4bc3-4df7-8a09-765794883524
2014-07-31ShellPkg: UpdateStdInStdOutStdErr(): extract WriteFileTag()Laszlo Ersek
Drop TagBuffer in the process. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jaben Carsey <Jaben.carsey@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15724 6f19259b-4bc3-4df7-8a09-765794883524
2014-01-23Update the comments in function headers to follow Doxygen special ↵Shumin Qiu
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-13ShellPkg: Remove UNICODE file tag (FEFF) from files used for input redirectionJaben Carsey
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
2013-12-13ShellPkg: add error messages into functionJaben Carsey
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-11-15ShellPkg: verify that leading and trailing % are removed from variable names ↵Jaben Carsey
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-10-24ShellPkg: Fixes the shell so output redirection works for the 'mode' commandChris Phillips
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-22ShellPkg: Fix copy load option error.Eric Dong
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-01-17ShellPkg: Fix pointer initialization error of “ShellOpt” Shell ↵jcarsey
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
2012-11-13ShellPkg: Clean up header file usage.jcarsey
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-13ShellPkg: Correct 3 places where memory was not being properly released by ↵jcarsey
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-08-17Update the "ConErr" related variable name to the new one "ErrOut".ydong10
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-01-27ShellPkg: fix redirection file parsing to allow spaces before filename.jcarsey
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
2011-11-11Shellpkg: Add support for filenames with spaces.jcarsey
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-10-22Fix a typo when check the return valueydong10
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-17ShellPkg: Add checking for memory allocation and pointer returns from functions.jcarsey
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-14ShellPkg: Add checking for memory allocation and pointer returns from functions.jcarsey
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-13ShellPkg: Set CRC value whenever changing a system table.jcarsey
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-09-02Refine comments and two code style.ydong10
Signed-off-by: ydong10 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12263 6f19259b-4bc3-4df7-8a09-765794883524
2011-06-15restore original information when redirection fails inside a command using ↵jcarsey
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-04-07ShellParametersProtocol - remove parsing from within quoted parameters.jcarsey
Pci - Add missing enumeration in switch statement. For - Verify parameter before dereferencing. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11511 6f19259b-4bc3-4df7-8a09-765794883524
2011-04-05add comments to function declarations and definitions and updated to match ↵jcarsey
coding style document. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11505 6f19259b-4bc3-4df7-8a09-765794883524
2011-04-01Comment's added and fixed.jcarsey
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
2011-04-01fix initialization of pointer.jcarsey
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11498 6f19259b-4bc3-4df7-8a09-765794883524
2011-03-30didn't mean to remove this comment.jcarsey
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11461 6f19259b-4bc3-4df7-8a09-765794883524
2011-03-30remove redirection command line updating from the shell core code.jcarsey
add redirection command line updating to the redirection support function (UpdateStdInStdOutStdErr). add more user input verification to redirection. reduce user input verification from inside quoted parameters. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11460 6f19259b-4bc3-4df7-8a09-765794883524
2011-03-25console logger - support disabling the console out.jcarsey
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
2010-11-16fixes for IPF, CTRL-C support, and file redirection.jcarsey
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11066 6f19259b-4bc3-4df7-8a09-765794883524
2010-10-041) Removing ASSERTs for proper return values. jcarsey
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
2010-09-14udk2010.up2.shell initial release.jcarsey
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10874 6f19259b-4bc3-4df7-8a09-765794883524