Signed-off-by: Ruiyu Ni<ruiyu.ni@intel.com>
Reviewed-by: Eric Dong<eric.dong@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13946
6f19259b-4bc3-4df7-8a09-
765794883524
/** @file\r
This module provide help function for displaying unicode string.\r
\r
/** @file\r
This module provide help function for displaying unicode string.\r
\r
- Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
VA_LIST Args;\r
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *ConOut;\r
EFI_SIMPLE_TEXT_OUTPUT_MODE SavedConsoleMode;\r
VA_LIST Args;\r
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *ConOut;\r
EFI_SIMPLE_TEXT_OUTPUT_MODE SavedConsoleMode;\r
// Wait for a keystroke\r
//\r
if (Key != NULL) {\r
// Wait for a keystroke\r
//\r
if (Key != NULL) {\r
- gBS->WaitForEvent (1, &gST->ConIn->WaitForKey, &EventIndex);\r
- gST->ConIn->ReadKeyStroke (gST->ConIn, Key);\r
+ while (TRUE) {\r
+ Status = gST->ConIn->ReadKeyStroke (gST->ConIn, Key);\r
+ if (!EFI_ERROR (Status)) {\r
+ break;\r
+ }\r
+\r
+ //\r
+ // If we encounter error, continue to read another key in.\r
+ //\r
+ if (Status != EFI_NOT_READY) {\r
+ continue;\r
+ }\r
+ gBS->WaitForEvent (1, &gST->ConIn->WaitForKey, &EventIndex);\r
+ }\r