mirror of https://github.com/acidanthera/audk.git
StdLib: Some deployed versions of the Simple Text Input Protocol randomly return either NUL characters or Scan Codes when just typing normal text. These changes filter out NUL characters and make Scan Code and error handling more robust.
StdLibPrivateInternalFiles/Include/Device/Console.h: Change UnGetKey, in the ConInstance structure, from an EFI_INPUT_KEY structure to a CHAR16 variable. Include/sys/termios.h: Add CHAR_SUB and CHAR_ESC for translation of '^Z' and the Escape Scan Code into the EOF and ESC characters, respectively. LibC/Uefi/Devices/Console/daConsole.c: Add da_ConRawRead() function to simplify the read logic. Discard NUL characters from the input stream. In Blocking mode, retry until a non-NUL character is received. In NonBlocking mode, a NUL causes an EAGAIN error to be returned. Translate the Escape Scan Code into an ESC character. If Scan Codes are ignored, retry if in Blocking mode else return an EAGAIN error. UnGetKey becomes a single wide character instead of a structure. Change da_Poll() to use da_ConRawRead(). LibC/Uefi/InteractiveIO/IIOutilities.c: BUG fix. Return the processed input character instead of the raw character. Allows EOF propagation. LibC/Uefi/InteractiveIO/CanonRead.c: Enable EOF propagation. LibC/Uefi/InteractiveIO/IIOechoCtrl.h: Use symbols defined in termios.h instead of hard-coded constant numbers. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Daryl McDaniel <daryl.mcdaniel@intel.com> Reviewed-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@16254 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
8dd618d211
commit
24903bc48a
|
@ -2,7 +2,7 @@
|
||||||
Macros and declarations for terminal oriented ioctls and
|
Macros and declarations for terminal oriented ioctls and
|
||||||
I/O discipline.
|
I/O discipline.
|
||||||
|
|
||||||
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
|
This program and the accompanying materials are licensed and made available under
|
||||||
the terms and conditions of the BSD License that accompanies this distribution.
|
the terms and conditions of the BSD License that accompanies this distribution.
|
||||||
The full text of the license may be found at
|
The full text of the license may be found at
|
||||||
|
@ -421,6 +421,8 @@ typedef enum {
|
||||||
} TtyFunKey;
|
} TtyFunKey;
|
||||||
|
|
||||||
// Non-UEFI character definitions
|
// Non-UEFI character definitions
|
||||||
#define CHAR_EOT 0x0004 /* End of Text (EOT) character */
|
#define CHAR_EOT 0x0004 /* End of Text (EOT) character -- Unix End-of-File character */
|
||||||
|
#define CHAR_SUB 0x001a /* MSDOS End-of-File character */
|
||||||
|
#define CHAR_ESC 0x001b /* Escape (ESC) character */
|
||||||
|
|
||||||
#endif /* !_SYS_TERMIOS_H_ */
|
#endif /* !_SYS_TERMIOS_H_ */
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
The devices status as a wide device is indicatd by _S_IWTTY being set in
|
The devices status as a wide device is indicatd by _S_IWTTY being set in
|
||||||
f_iflags.
|
f_iflags.
|
||||||
|
|
||||||
Copyright (c) 2010 - 2012, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials are licensed and made available under
|
This program and the accompanying materials are licensed and made available under
|
||||||
the terms and conditions of the BSD License that accompanies this distribution.
|
the terms and conditions of the BSD License that accompanies this distribution.
|
||||||
The full text of the license may be found at
|
The full text of the license may be found at
|
||||||
|
@ -24,6 +24,7 @@
|
||||||
#include <Library/BaseLib.h>
|
#include <Library/BaseLib.h>
|
||||||
#include <Library/MemoryAllocationLib.h>
|
#include <Library/MemoryAllocationLib.h>
|
||||||
#include <Library/UefiBootServicesTableLib.h>
|
#include <Library/UefiBootServicesTableLib.h>
|
||||||
|
#include <Library/DebugLib.h>
|
||||||
#include <Protocol/SimpleTextIn.h>
|
#include <Protocol/SimpleTextIn.h>
|
||||||
#include <Protocol/SimpleTextOut.h>
|
#include <Protocol/SimpleTextOut.h>
|
||||||
|
|
||||||
|
@ -35,6 +36,7 @@
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <sys/fcntl.h>
|
#include <sys/fcntl.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#include <sys/termios.h>
|
||||||
#include <kfile.h>
|
#include <kfile.h>
|
||||||
#include <Device/Device.h>
|
#include <Device/Device.h>
|
||||||
#include <Device/IIO.h>
|
#include <Device/IIO.h>
|
||||||
|
@ -238,7 +240,6 @@ da_ConWrite(
|
||||||
|
|
||||||
// Depending on status, update BufferSize and return
|
// Depending on status, update BufferSize and return
|
||||||
if(!RETURN_ERROR(Status)) {
|
if(!RETURN_ERROR(Status)) {
|
||||||
//BufferSize = NumChar;
|
|
||||||
NumChar = BufferSize;
|
NumChar = BufferSize;
|
||||||
Stream->NumWritten += NumChar;
|
Stream->NumWritten += NumChar;
|
||||||
}
|
}
|
||||||
|
@ -246,13 +247,85 @@ da_ConWrite(
|
||||||
return NumChar;
|
return NumChar;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Read a wide character from the console input device.
|
||||||
|
|
||||||
|
Returns NUL or a translated input character.
|
||||||
|
|
||||||
|
@param[in] filp Pointer to file descriptor for this file.
|
||||||
|
@param[out] Buffer Buffer in which to place the read character.
|
||||||
|
|
||||||
|
@retval EFI_DEVICE_ERROR A hardware error has occurred.
|
||||||
|
@retval EFI_NOT_READY No data is available. Try again later.
|
||||||
|
@retval EFI_SUCCESS One wide character has been placed in Character
|
||||||
|
- 0x0000 NUL, ignore this
|
||||||
|
- Otherwise, should be a good wide character in Character
|
||||||
|
**/
|
||||||
|
static
|
||||||
|
EFI_STATUS
|
||||||
|
da_ConRawRead (
|
||||||
|
IN OUT struct __filedes *filp,
|
||||||
|
OUT wchar_t *Character
|
||||||
|
)
|
||||||
|
{
|
||||||
|
EFI_SIMPLE_TEXT_INPUT_PROTOCOL *Proto;
|
||||||
|
ConInstance *Stream;
|
||||||
|
cIIO *Self;
|
||||||
|
EFI_STATUS Status;
|
||||||
|
EFI_INPUT_KEY Key = {0,0};
|
||||||
|
wchar_t RetChar;
|
||||||
|
|
||||||
|
Self = (cIIO *)filp->devdata;
|
||||||
|
Stream = BASE_CR(filp->f_ops, ConInstance, Abstraction);
|
||||||
|
Proto = (EFI_SIMPLE_TEXT_INPUT_PROTOCOL *)Stream->Dev;
|
||||||
|
|
||||||
|
if(Stream->UnGetKey == CHAR_NULL) {
|
||||||
|
Status = Proto->ReadKeyStroke(Proto, &Key);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Status = EFI_SUCCESS;
|
||||||
|
// Use the data in the Un-get buffer
|
||||||
|
// Guaranteed that ScanCode and UnicodeChar are not both NUL
|
||||||
|
Key.ScanCode = SCAN_NULL;
|
||||||
|
Key.UnicodeChar = Stream->UnGetKey;
|
||||||
|
Stream->UnGetKey = CHAR_NULL;
|
||||||
|
}
|
||||||
|
if(Status == EFI_SUCCESS) {
|
||||||
|
// Translate the Escape Scan Code to an ESC character
|
||||||
|
if (Key.ScanCode != 0) {
|
||||||
|
if (Key.ScanCode == SCAN_ESC) {
|
||||||
|
RetChar = CHAR_ESC;
|
||||||
|
}
|
||||||
|
else if((Self->Termio.c_iflag & IGNSPEC) != 0) {
|
||||||
|
// If we are ignoring special characters, return a NUL
|
||||||
|
RetChar = 0;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// Must be a control, function, or other non-printable key.
|
||||||
|
// Map it into the Platform portion of the Unicode private use area
|
||||||
|
RetChar = TtyFunKeyMax - Key.ScanCode;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
RetChar = Key.UnicodeChar;
|
||||||
|
}
|
||||||
|
*Character = RetChar;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
*Character = 0;
|
||||||
|
}
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
/** Read a wide character from the console input device.
|
/** Read a wide character from the console input device.
|
||||||
|
|
||||||
NOTE: The UEFI Console is a wide device, _S_IWTTY, so characters returned
|
NOTE: The UEFI Console is a wide device, _S_IWTTY, so characters returned
|
||||||
by da_ConRead are WIDE characters. It is the responsibility of the
|
by da_ConRead are WIDE characters. It is the responsibility of the
|
||||||
higher-level function(s) to perform any necessary conversions.
|
higher-level function(s) to perform any necessary conversions.
|
||||||
|
|
||||||
@param[in,out] BufferSize Number of characters in Buffer.
|
A NUL character, 0x0000, is never returned. In the event that such a character
|
||||||
|
is encountered, the read is either retried or -1 is returned with errno set
|
||||||
|
to EAGAIN.
|
||||||
|
|
||||||
@param[in] filp Pointer to file descriptor for this file.
|
@param[in] filp Pointer to file descriptor for this file.
|
||||||
@param[in] offset Ignored.
|
@param[in] offset Ignored.
|
||||||
@param[in] BufferSize Buffer size, in bytes.
|
@param[in] BufferSize Buffer size, in bytes.
|
||||||
|
@ -274,45 +347,42 @@ da_ConRead(
|
||||||
{
|
{
|
||||||
EFI_SIMPLE_TEXT_INPUT_PROTOCOL *Proto;
|
EFI_SIMPLE_TEXT_INPUT_PROTOCOL *Proto;
|
||||||
ConInstance *Stream;
|
ConInstance *Stream;
|
||||||
cIIO *Self;
|
//cIIO *Self;
|
||||||
EFI_INPUT_KEY Key = {0,0};
|
EFI_STATUS Status;
|
||||||
EFI_STATUS Status = RETURN_SUCCESS;
|
|
||||||
UINTN Edex;
|
UINTN Edex;
|
||||||
ssize_t NumRead;
|
ssize_t NumRead;
|
||||||
int Flags;
|
BOOLEAN BlockingMode;
|
||||||
wchar_t RetChar; // Default to No Data
|
wchar_t RetChar;
|
||||||
|
|
||||||
NumRead = -1;
|
NumRead = -1;
|
||||||
if(BufferSize < sizeof(wchar_t)) {
|
if(BufferSize < sizeof(wchar_t)) {
|
||||||
errno = EINVAL; // Buffer is too small to hold one character
|
errno = EINVAL; // Buffer is too small to hold one character
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Self = (cIIO *)filp->devdata;
|
|
||||||
Stream = BASE_CR(filp->f_ops, ConInstance, Abstraction);
|
Stream = BASE_CR(filp->f_ops, ConInstance, Abstraction);
|
||||||
Proto = (EFI_SIMPLE_TEXT_INPUT_PROTOCOL *)Stream->Dev;
|
Proto = (EFI_SIMPLE_TEXT_INPUT_PROTOCOL *)Stream->Dev;
|
||||||
Flags = filp->Oflags;
|
BlockingMode = ((filp->Oflags & O_NONBLOCK) == 0);
|
||||||
if((Stream->UnGetKey.UnicodeChar == CHAR_NULL) && (Stream->UnGetKey.ScanCode == SCAN_NULL)) {
|
|
||||||
// No data pending in the Un-get buffer. Get a char from the hardware.
|
do {
|
||||||
if((Flags & O_NONBLOCK) == 0) {
|
Status = EFI_SUCCESS;
|
||||||
|
if(BlockingMode) {
|
||||||
// Read a byte in Blocking mode
|
// Read a byte in Blocking mode
|
||||||
Status = gBS->WaitForEvent( 1, &Proto->WaitForKey, &Edex);
|
Status = gBS->WaitForEvent( 1, &Proto->WaitForKey, &Edex);
|
||||||
EFIerrno = Status;
|
|
||||||
if(Status != EFI_SUCCESS) {
|
|
||||||
errno = EINVAL;
|
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
Status = Proto->ReadKeyStroke(Proto, &Key);
|
/* WaitForEvent should not be able to fail since
|
||||||
if(Status == EFI_SUCCESS) {
|
NumberOfEvents is set to constant 1 so is never 0
|
||||||
NumRead = 1; // Indicate that Key holds the data
|
Event is set by the Simple Text Input protocol so should never be EVT_NOTIFY_SIGNAL
|
||||||
}
|
Current TPL should be TPL_APPLICATION.
|
||||||
else {
|
ASSERT so that we catch any problems during development.
|
||||||
errno = EIO;
|
*/
|
||||||
}
|
ASSERT(Status == EFI_SUCCESS);
|
||||||
}
|
|
||||||
}
|
Status = da_ConRawRead (filp, &RetChar);
|
||||||
else {
|
} while ( BlockingMode &&
|
||||||
// Read a byte in Non-Blocking mode
|
(RetChar == 0) &&
|
||||||
Status = Proto->ReadKeyStroke(Proto, &Key);
|
(Status != EFI_DEVICE_ERROR));
|
||||||
|
|
||||||
EFIerrno = Status;
|
EFIerrno = Status;
|
||||||
if(Status == EFI_SUCCESS) {
|
if(Status == EFI_SUCCESS) {
|
||||||
// Got a keystroke.
|
// Got a keystroke.
|
||||||
|
@ -326,24 +396,11 @@ da_ConRead(
|
||||||
// Hardware error
|
// Hardware error
|
||||||
errno = EIO;
|
errno = EIO;
|
||||||
}
|
}
|
||||||
}
|
if (RetChar == 0) {
|
||||||
|
NumRead = -1;
|
||||||
|
errno = EAGAIN;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Use the data in the Un-get buffer
|
|
||||||
Key.ScanCode = Stream->UnGetKey.ScanCode;
|
|
||||||
Key.UnicodeChar = Stream->UnGetKey.UnicodeChar;
|
|
||||||
Stream->UnGetKey.ScanCode = SCAN_NULL;
|
|
||||||
Stream->UnGetKey.UnicodeChar = CHAR_NULL;
|
|
||||||
NumRead = 1; // Indicate that Key holds the data
|
|
||||||
}
|
|
||||||
// If we have data, prepare it for return.
|
|
||||||
if(NumRead == 1) {
|
|
||||||
RetChar = Key.UnicodeChar;
|
|
||||||
if((RetChar == 0) && ((Self->Termio.c_iflag & IGNSPEC) == 0)) {
|
|
||||||
// Must be a control, function, or other non-printable key.
|
|
||||||
// Map it into the Platform portion of the Unicode private use area
|
|
||||||
RetChar = (Key.ScanCode == 0) ? 0 : 0xF900U - Key.ScanCode;
|
|
||||||
}
|
|
||||||
*((wchar_t *)Buffer) = RetChar;
|
*((wchar_t *)Buffer) = RetChar;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -542,24 +599,23 @@ da_ConPoll(
|
||||||
return POLLNVAL; // Looks like a bad filp pointer
|
return POLLNVAL; // Looks like a bad filp pointer
|
||||||
}
|
}
|
||||||
if(Stream->InstanceNum == 0) {
|
if(Stream->InstanceNum == 0) {
|
||||||
// Only input is supported for this device
|
// STDIN: Only input is supported for this device
|
||||||
Proto = (EFI_SIMPLE_TEXT_INPUT_PROTOCOL *)Stream->Dev;
|
Proto = (EFI_SIMPLE_TEXT_INPUT_PROTOCOL *)Stream->Dev;
|
||||||
if((Stream->UnGetKey.UnicodeChar == CHAR_NULL) && (Stream->UnGetKey.ScanCode == SCAN_NULL)) {
|
Status = da_ConRawRead (filp, &Stream->UnGetKey);
|
||||||
Status = Proto->ReadKeyStroke(Proto, &Stream->UnGetKey);
|
|
||||||
if(Status == RETURN_SUCCESS) {
|
if(Status == RETURN_SUCCESS) {
|
||||||
RdyMask = POLLIN;
|
RdyMask = POLLIN;
|
||||||
if(Stream->UnGetKey.UnicodeChar != CHAR_NULL) {
|
if ((Stream->UnGetKey < TtyFunKeyMin) ||
|
||||||
|
(Stream->UnGetKey >= TtyFunKeyMax))
|
||||||
|
{
|
||||||
RdyMask |= POLLRDNORM;
|
RdyMask |= POLLRDNORM;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Stream->UnGetKey.ScanCode = SCAN_NULL;
|
Stream->UnGetKey = CHAR_NULL;
|
||||||
Stream->UnGetKey.UnicodeChar = CHAR_NULL;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(Stream->InstanceNum < NUM_SPECIAL) { // Not 0, is it 1 or 2?
|
else if(Stream->InstanceNum < NUM_SPECIAL) { // Not 0, is it 1 or 2?
|
||||||
// Only output is supported for this device
|
// (STDOUT || STDERR): Only output is supported for this device
|
||||||
RdyMask = POLLOUT;
|
RdyMask = POLLOUT;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -638,8 +694,7 @@ __Cons_construct(
|
||||||
|
|
||||||
Stream->NumRead = 0;
|
Stream->NumRead = 0;
|
||||||
Stream->NumWritten = 0;
|
Stream->NumWritten = 0;
|
||||||
Stream->UnGetKey.ScanCode = SCAN_NULL;
|
Stream->UnGetKey = CHAR_NULL;
|
||||||
Stream->UnGetKey.UnicodeChar = CHAR_NULL;
|
|
||||||
|
|
||||||
if(Stream->Dev == NULL) {
|
if(Stream->Dev == NULL) {
|
||||||
continue; // No device for this stream.
|
continue; // No device for this stream.
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
The functions assume that isatty() is TRUE at the time they are called.
|
The functions assume that isatty() is TRUE at the time they are called.
|
||||||
|
|
||||||
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
|
This program and the accompanying materials are licensed and made available
|
||||||
under the terms and conditions of the BSD License which accompanies this
|
under the terms and conditions of the BSD License which accompanies this
|
||||||
distribution. The full text of the license may be found at
|
distribution. The full text of the license may be found at
|
||||||
|
@ -87,6 +87,10 @@ IIO_CanonRead (
|
||||||
// Input and process characters until BufferSize is exhausted.
|
// Input and process characters until BufferSize is exhausted.
|
||||||
do {
|
do {
|
||||||
InChar = IIO_GetInChar(filp, FirstRead);
|
InChar = IIO_GetInChar(filp, FirstRead);
|
||||||
|
if (InChar == WEOF) {
|
||||||
|
NumRead = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
FirstRead = FALSE;
|
FirstRead = FALSE;
|
||||||
Activate = TRUE;
|
Activate = TRUE;
|
||||||
if(InChar == CHAR_CARRIAGE_RETURN) {
|
if(InChar == CHAR_CARRIAGE_RETURN) {
|
||||||
|
@ -128,6 +132,8 @@ IIO_CanonRead (
|
||||||
}
|
}
|
||||||
else if(CCEQ(Termio->c_cc[VEOF], InChar)) {
|
else if(CCEQ(Termio->c_cc[VEOF], InChar)) {
|
||||||
InChar = WEOF;
|
InChar = WEOF;
|
||||||
|
NumRead = 0;
|
||||||
|
EchoIsOK = FALSE; // Buffer, but don't echo this character
|
||||||
}
|
}
|
||||||
else if(CCEQ(Termio->c_cc[VEOL], InChar)) {
|
else if(CCEQ(Termio->c_cc[VEOL], InChar)) {
|
||||||
EchoIsOK = FALSE; // Buffer, but don't echo this character
|
EchoIsOK = FALSE; // Buffer, but don't echo this character
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/** @file
|
/** @file
|
||||||
Constants and declarations for the Echo function.
|
Constants and declarations for the Echo function.
|
||||||
|
|
||||||
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
|
This program and the accompanying materials are licensed and made available
|
||||||
under the terms and conditions of the BSD License which accompanies this
|
under the terms and conditions of the BSD License which accompanies this
|
||||||
distribution. The full text of the license may be found at
|
distribution. The full text of the license may be found at
|
||||||
|
@ -18,10 +18,10 @@ __BEGIN_DECLS
|
||||||
|
|
||||||
/* These constants are assigned values within the Unicode Private Use range.
|
/* These constants are assigned values within the Unicode Private Use range.
|
||||||
The value of IIO_ECHO_MIN must be adjusted to ensure that IIO_ECHO_MAX
|
The value of IIO_ECHO_MIN must be adjusted to ensure that IIO_ECHO_MAX
|
||||||
never exceeds the value of 0xF900.
|
never exceeds the value of (TtyFunKeyMin - 1).
|
||||||
*/
|
*/
|
||||||
typedef enum {
|
typedef enum {
|
||||||
IIO_ECHO_MIN = (TtyFunKeyMin - 3),
|
IIO_ECHO_MIN = (TtySpecKeyMin),
|
||||||
IIO_ECHO_DISCARD = IIO_ECHO_MIN, // Ignore this character completely
|
IIO_ECHO_DISCARD = IIO_ECHO_MIN, // Ignore this character completely
|
||||||
IIO_ECHO_ERASE, // Erase previous character
|
IIO_ECHO_ERASE, // Erase previous character
|
||||||
IIO_ECHO_KILL, // Kill the entire line
|
IIO_ECHO_KILL, // Kill the entire line
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
The functions assume that isatty() is TRUE at the time they are called.
|
The functions assume that isatty() is TRUE at the time they are called.
|
||||||
|
|
||||||
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
|
This program and the accompanying materials are licensed and made available
|
||||||
under the terms and conditions of the BSD License which accompanies this
|
under the terms and conditions of the BSD License which accompanies this
|
||||||
distribution. The full text of the license may be found at
|
distribution. The full text of the license may be found at
|
||||||
|
@ -104,7 +104,7 @@ IIO_GetInChar (
|
||||||
else {
|
else {
|
||||||
RetVal = (wint_t)InChar;
|
RetVal = (wint_t)InChar;
|
||||||
}
|
}
|
||||||
return InChar;
|
return RetVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Get the current cursor position.
|
/** Get the current cursor position.
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/** @file
|
/** @file
|
||||||
Declarations and macros for the console abstraction.
|
Declarations and macros for the console abstraction.
|
||||||
|
|
||||||
Copyright (c) 2010 - 2012, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials are licensed and made available
|
This program and the accompanying materials are licensed and made available
|
||||||
under the terms and conditions of the BSD License which accompanies this
|
under the terms and conditions of the BSD License which accompanies this
|
||||||
distribution. The full text of the license may be found at
|
distribution. The full text of the license may be found at
|
||||||
|
@ -32,8 +32,8 @@ typedef struct {
|
||||||
UINTN Reserved_1; // Ensure that next member starts on an 8-byte boundary
|
UINTN Reserved_1; // Ensure that next member starts on an 8-byte boundary
|
||||||
UINT64 NumRead; ///< Number of characters Read.
|
UINT64 NumRead; ///< Number of characters Read.
|
||||||
UINT64 NumWritten; ///< Number of characters Written.
|
UINT64 NumWritten; ///< Number of characters Written.
|
||||||
EFI_INPUT_KEY UnGetKey; ///< One-key pushback, for poll().
|
|
||||||
__mbstate_t CharState; ///< Character state for the byte stream passing through this device
|
__mbstate_t CharState; ///< Character state for the byte stream passing through this device
|
||||||
|
CHAR16 UnGetKey; ///< One-key pushback, for poll().
|
||||||
} ConInstance;
|
} ConInstance;
|
||||||
|
|
||||||
__BEGIN_DECLS
|
__BEGIN_DECLS
|
||||||
|
|
Loading…
Reference in New Issue