]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ShellPkg: Remove ASSERT
authorJaben Carsey <jaben.carsey@intel.com>
Thu, 16 Jan 2014 16:53:23 +0000 (16:53 +0000)
committerjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 16 Jan 2014 16:53:23 +0000 (16:53 +0000)
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

ShellPkg/Application/Shell/ConsoleLogger.c

index 6f7ed95a611ebec13cf6417e0919ada3cc0ee652..fa7c07c7545345cc5bbfacea09b536e5a3dc1975 100644 (file)
@@ -2,7 +2,7 @@
   Provides interface to shell console logger.\r
 \r
   Copyright (c) 2013 Hewlett-Packard Development Company, L.P.\r
-  Copyright (c) 2009 - 2013, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2014, 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
@@ -842,7 +842,9 @@ ConsoleLoggerOutputString (
       Status = gBS->WaitForEvent (1, &TxtInEx->WaitForKeyEx, &EventIndex);\r
       ASSERT_EFI_ERROR (Status);\r
       Status = TxtInEx->ReadKeyStrokeEx (TxtInEx, &KeyData);\r
-      ASSERT_EFI_ERROR (Status);\r
+      if (EFI_ERROR(Status)) {\r
+        break;\r
+      }\r
 \r
       if ((KeyData.Key.UnicodeChar == L's') && (KeyData.Key.ScanCode == SCAN_NULL) &&\r
           ((KeyData.KeyState.KeyShiftState == (EFI_SHIFT_STATE_VALID | EFI_LEFT_CONTROL_PRESSED)) ||\r