Revision: 13945
http://edk2.svn.sourceforge.net/edk2/?rev=13945&view=rev
Author: niruiyu
Date: 2012-11-15 06:31:25 +0000 (Thu, 15 Nov 2012)
Log Message:
-----------
Enhance CreatePopup to call ReadKeyStroke() before calling WaitForEvent(). This
can handle the case when in lazy ConIn mode.
Signed-off-by: Ruiyu Ni<[email protected]>
Reviewed-by: Eric Dong<[email protected]>
Modified Paths:
--------------
trunk/edk2/MdePkg/Library/UefiLib/Console.c
Modified: trunk/edk2/MdePkg/Library/UefiLib/Console.c
===================================================================
--- trunk/edk2/MdePkg/Library/UefiLib/Console.c 2012-11-15 02:10:44 UTC (rev
13944)
+++ trunk/edk2/MdePkg/Library/UefiLib/Console.c 2012-11-15 06:31:25 UTC (rev
13945)
@@ -406,6 +406,7 @@
...
)
{
+ EFI_STATUS Status;
VA_LIST Args;
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *ConOut;
EFI_SIMPLE_TEXT_OUTPUT_MODE SavedConsoleMode;
@@ -554,7 +555,19 @@
// Wait for a keystroke
//
if (Key != NULL) {
- gBS->WaitForEvent (1, &gST->ConIn->WaitForKey, &EventIndex);
- gST->ConIn->ReadKeyStroke (gST->ConIn, Key);
+ while (TRUE) {
+ Status = gST->ConIn->ReadKeyStroke (gST->ConIn, Key);
+ if (!EFI_ERROR (Status)) {
+ break;
+ }
+
+ //
+ // If we encounter error, continue to read another key in.
+ //
+ if (Status != EFI_NOT_READY) {
+ continue;
+ }
+ gBS->WaitForEvent (1, &gST->ConIn->WaitForKey, &EventIndex);
+ }
}
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits