]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/UefiShellLevel3CommandsLib/Pause.c
Remove 2 unnecessary modules (Ps2MouseDxe, Ps2keyboardDxe) for saving size.
[mirror_edk2.git] / ShellPkg / Library / UefiShellLevel3CommandsLib / Pause.c
index facacaac7dee6e47868392540244c9b1c4e4d6a9..ea414cbd6e6a48b09257a4c8a5ff45764d67cc31 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Main file for Pause shell level 3 function.\r
 \r
-  Copyright (c) 2009 - 2010, 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
@@ -40,6 +40,7 @@ ShellCommandRunPause (
 \r
   ProblemParam        = NULL;\r
   ShellStatus         = SHELL_SUCCESS;\r
+  Resp                = NULL;\r
 \r
   //\r
   // initialize the shell lib (we must be in non-auto-init...)\r
@@ -82,10 +83,9 @@ ShellCommandRunPause (
       } else {\r
         Status = ShellPromptForResponse(ShellPromptResponseTypeQuitContinue, NULL, (VOID**)&Resp);\r
       }\r
-      ASSERT_EFI_ERROR(Status);\r
 \r
-      if (Resp == NULL || *Resp == ShellPromptResponseQuit) {\r
-        ShellCommandRegisterExit(TRUE);\r
+      if (EFI_ERROR(Status) || Resp == NULL || *Resp == ShellPromptResponseQuit) {\r
+        ShellCommandRegisterExit(TRUE, 0);\r
         ShellStatus = SHELL_ABORTED;\r
       }\r
 \r