summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaben Carsey <jaben.carsey@intel.com>2014-01-16 16:53:23 +0000
committerjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>2014-01-16 16:53:23 +0000
commit8e4a89a335e1dd5c8649bb293bc609358b6a8b86 (patch)
tree599cbe1b123589b540d0f0f5d68d1b16b200b963
parent31b018a663be0fb23f3a4f612aaedf86a8bd10fc (diff)
downloadedk2-8e4a89a335e1dd5c8649bb293bc609358b6a8b86.tar.gz
edk2-8e4a89a335e1dd5c8649bb293bc609358b6a8b86.tar.bz2
edk2-8e4a89a335e1dd5c8649bb293bc609358b6a8b86.zip
ShellPkg: Remove ASSERT
This change removes ASSERT statements and replaces them with logic to break out of the loop. This both prevents spinning forever and prevents processing the returned data from the function that failed. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15134 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--ShellPkg/Application/Shell/ConsoleLogger.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ShellPkg/Application/Shell/ConsoleLogger.c b/ShellPkg/Application/Shell/ConsoleLogger.c
index 6f7ed95a61..fa7c07c754 100644
--- a/ShellPkg/Application/Shell/ConsoleLogger.c
+++ b/ShellPkg/Application/Shell/ConsoleLogger.c
@@ -2,7 +2,7 @@
Provides interface to shell console logger.
Copyright (c) 2013 Hewlett-Packard Development Company, L.P.
- Copyright (c) 2009 - 2013, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2009 - 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
@@ -842,7 +842,9 @@ ConsoleLoggerOutputString (
Status = gBS->WaitForEvent (1, &TxtInEx->WaitForKeyEx, &EventIndex);
ASSERT_EFI_ERROR (Status);
Status = TxtInEx->ReadKeyStrokeEx (TxtInEx, &KeyData);
- ASSERT_EFI_ERROR (Status);
+ if (EFI_ERROR(Status)) {
+ break;
+ }
if ((KeyData.Key.UnicodeChar == L's') && (KeyData.Key.ScanCode == SCAN_NULL) &&
((KeyData.KeyState.KeyShiftState == (EFI_SHIFT_STATE_VALID | EFI_LEFT_CONTROL_PRESSED)) ||