Integrate patch from Andrew Fish to make it run on OS X.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9194 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
qhuang8
2009-08-25 07:29:13 +00:00
parent 7f22d35110
commit ccd55824e7
44 changed files with 1038 additions and 359 deletions

View File

@ -27,7 +27,7 @@ Abstract:
--*/
#include "Console.h"
#include <sys/poll.h>
#include <sys/poll.h>
//
// Private worker functions
@ -68,7 +68,7 @@ Returns:
EFI_STATUS
UnixConvertInputRecordToEfiKey (
IN char c,
IN char c,
OUT EFI_INPUT_KEY *Key
)
/*++
@ -92,8 +92,8 @@ Returns:
--*/
{
Key->ScanCode = 0;
if (c == '\n')
c = '\r';
if (c == '\n')
c = '\r';
Key->UnicodeChar = c;
return EFI_SUCCESS;
}
@ -124,7 +124,7 @@ Returns:
{
EFI_STATUS Status;
UNIX_SIMPLE_TEXT_PRIVATE_DATA *Private;
char c;
char c;
Private = UNIX_SIMPLE_TEXT_IN_PRIVATE_DATA_FROM_THIS (This);
@ -133,7 +133,7 @@ Returns:
return Status;
}
if (Private->UnixThunk->Read (0, &c, 1) != 1)
if (Private->UnixThunk->Read (0, &c, 1) != 1)
return EFI_NOT_READY;
Status = UnixConvertInputRecordToEfiKey (c, Key);
@ -193,11 +193,11 @@ Returns:
--*/
{
struct pollfd pfd;
struct pollfd pfd;
pfd.fd = 0;
pfd.events = POLLIN;
if (Private->UnixThunk->Poll (&pfd, 1, 0) <= 0) {
pfd.fd = 0;
pfd.events = POLLIN;
if (Private->UnixThunk->Poll (&pfd, 1, 0) <= 0) {
return EFI_NOT_READY;
}
return EFI_SUCCESS;