From 8e4a89a335e1dd5c8649bb293bc609358b6a8b86 Mon Sep 17 00:00:00 2001 From: Jaben Carsey Date: Thu, 16 Jan 2014 16:53:23 +0000 Subject: [PATCH] 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 Reviewed-by: Ruiyu Ni git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15134 6f19259b-4bc3-4df7-8a09-765794883524 --- ShellPkg/Application/Shell/ConsoleLogger.c | 6 ++++-- 1 file 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.
+ Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.
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)) ||