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
This commit is contained in:
Jaben Carsey 2014-01-16 16:53:23 +00:00 committed by jcarsey
parent 31b018a663
commit 8e4a89a335
1 changed files with 4 additions and 2 deletions

View File

@ -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)) ||