summaryrefslogtreecommitdiff
path: root/StdLib/LibC/Uefi/InteractiveIO
diff options
context:
space:
mode:
Diffstat (limited to 'StdLib/LibC/Uefi/InteractiveIO')
-rw-r--r--StdLib/LibC/Uefi/InteractiveIO/IIOutilities.c8
-rw-r--r--StdLib/LibC/Uefi/InteractiveIO/IIOwrite.c5
-rw-r--r--StdLib/LibC/Uefi/InteractiveIO/NonCanonRead.c3
3 files changed, 7 insertions, 9 deletions
diff --git a/StdLib/LibC/Uefi/InteractiveIO/IIOutilities.c b/StdLib/LibC/Uefi/InteractiveIO/IIOutilities.c
index 0e80ff0eaf..2e61cd1e80 100644
--- a/StdLib/LibC/Uefi/InteractiveIO/IIOutilities.c
+++ b/StdLib/LibC/Uefi/InteractiveIO/IIOutilities.c
@@ -75,7 +75,7 @@ IIO_GetInChar (
{
cIIO *This;
cFIFO *InBuf;
- EFI_STATUS Status;
+ size_t Status;
ssize_t NumRead;
wint_t RetVal;
wchar_t InChar;
@@ -92,8 +92,10 @@ IIO_GetInChar (
}
if(BufCnt > 0) {
Status = InBuf->Read(InBuf, &InChar, 1);
- --BufCnt;
- NumRead = 1;
+ if (Status > 0) {
+ --BufCnt;
+ NumRead = 1;
+ }
}
else {
NumRead = filp->f_ops->fo_read(filp, &filp->f_offset, sizeof(wchar_t), &InChar);
diff --git a/StdLib/LibC/Uefi/InteractiveIO/IIOwrite.c b/StdLib/LibC/Uefi/InteractiveIO/IIOwrite.c
index 927f4f4ff3..ef52cc890e 100644
--- a/StdLib/LibC/Uefi/InteractiveIO/IIOwrite.c
+++ b/StdLib/LibC/Uefi/InteractiveIO/IIOwrite.c
@@ -8,7 +8,7 @@
It is the responsibility of the caller, or higher level function, to perform
any necessary translation between wide and narrow characters.
- Copyright (c) 2012, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2012 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available
under the terms and conditions of the BSD License which accompanies this
distribution. The full text of the license may be found at
@@ -63,7 +63,6 @@ IIO_WriteOne(struct __filedes *filp, cFIFO *OBuf, wchar_t InCh)
UINT32 CurRow; // Current cursor row on the screen
UINT32 PrevColumn; // Previous column. Used to detect wrapping.
UINT32 AdjColumn; // Current cursor column on the screen
- UINT32 AdjRow; // Current cursor row on the screen
RetVal = -1;
wcb = wc;
@@ -79,7 +78,6 @@ IIO_WriteOne(struct __filedes *filp, cFIFO *OBuf, wchar_t InCh)
CurRow = This->CurrentXY.Row;
numW = 1; // The majority of characters buffer one character
- AdjRow = 0; // Most characters just cause horizontal movement
AdjColumn = 0;
if(OFlag & OPOST) {
/* Perform output processing */
@@ -127,7 +125,6 @@ IIO_WriteOne(struct __filedes *filp, cFIFO *OBuf, wchar_t InCh)
numW = 2;
CurColumn = 0;
}
- AdjRow = 1;
break; //}}
case CHAR_BACKSPACE: //{{
diff --git a/StdLib/LibC/Uefi/InteractiveIO/NonCanonRead.c b/StdLib/LibC/Uefi/InteractiveIO/NonCanonRead.c
index bcae9c8239..aab81cdaa8 100644
--- a/StdLib/LibC/Uefi/InteractiveIO/NonCanonRead.c
+++ b/StdLib/LibC/Uefi/InteractiveIO/NonCanonRead.c
@@ -37,7 +37,6 @@ IIO_NonCanonRead (
cIIO *This;
cFIFO *InBuf;
struct termios *Termio;
- EFI_STATUS Status;
ssize_t NumRead;
cc_t tioMin;
cc_t tioTime;
@@ -74,7 +73,7 @@ IIO_NonCanonRead (
if(InBuf->IsEmpty(InBuf)) {
NumRead = filp->f_ops->fo_read(filp, &filp->f_offset, sizeof(wchar_t), &InChar);
if(NumRead > 0) {
- Status = InBuf->Write(InBuf, &InChar, 1); // Buffer the character
+ (void) InBuf->Write(InBuf, &InChar, 1); // Buffer the character
}
}
// break;