Revision: 14013
http://edk2.svn.sourceforge.net/edk2/?rev=14013&view=rev
Author: darylm503
Date: 2012-12-21 18:19:41 +0000 (Fri, 21 Dec 2012)
Log Message:
-----------
StdLib: Fix issue with Canonical output expansion of NL to CR NL and similar
expansions.
SysCalls.c: Add IGNSPEC to the "sane" termios settings so that, by default,
function keys and other special keys are ignored.
fvwrite.c:
Line 109: Change test to less-than zero since zero is a valid value.
Line 113: Change test to greater-than zero since we only want to loop when
there are characters available.
Line 114: Force uio_resid to zero since it might have become negative on line
113.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: [email protected]
Reviewed-by: [email protected]
Reviewed-by: [email protected]
Reviewed-by: [email protected]
Modified Paths:
--------------
trunk/edk2/StdLib/LibC/Stdio/fvwrite.c
trunk/edk2/StdLib/LibC/Uefi/SysCalls.c
Modified: trunk/edk2/StdLib/LibC/Stdio/fvwrite.c
===================================================================
--- trunk/edk2/StdLib/LibC/Stdio/fvwrite.c 2012-12-21 00:52:57 UTC (rev
14012)
+++ trunk/edk2/StdLib/LibC/Stdio/fvwrite.c 2012-12-21 18:19:41 UTC (rev
14013)
@@ -106,11 +106,12 @@
GETIOV(;);
w = (*fp->_write)(fp->_cookie, p,
(int)MIN(len, BUFSIZ));
- if (w <= 0)
+ if (w < 0)
goto err;
p += w;
len -= w;
- } while ((uio->uio_resid -= w) != 0);
+ } while ((uio->uio_resid -= w) > 0);
+ uio->uio_resid = 0; // Just in case it went negative such as when NL is
expanded to CR NL
} else if ((fp->_flags & __SLBF) == 0) {
/*
* Fully buffered: fill partially full buffer, if any,
Modified: trunk/edk2/StdLib/LibC/Uefi/SysCalls.c
===================================================================
--- trunk/edk2/StdLib/LibC/Uefi/SysCalls.c 2012-12-21 00:52:57 UTC (rev
14012)
+++ trunk/edk2/StdLib/LibC/Uefi/SysCalls.c 2012-12-21 18:19:41 UTC (rev
14013)
@@ -708,7 +708,7 @@
if((oflags & O_TTY_INIT) && (filp->f_iflags & _S_ITTY) &&
(filp->devdata != NULL)) {
// Initialize the device's termios flags to a "sane" value
Termio = &((cIIO *)filp->devdata)->Termio;
- Termio->c_iflag = ICRNL;
+ Termio->c_iflag = ICRNL | IGNSPEC;
Termio->c_oflag = OPOST | ONLCR | OXTABS | ONOEOT | ONOCR | ONLRET |
OCTRL;
Termio->c_lflag = ECHO | ECHOE | ECHONL | ICANON;
Termio->c_cc[VERASE] = 0x08; // ^H Backspace
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits