]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ShellPkg: Return the failure
authorJaben Carsey <jaben.carsey@intel.com>
Thu, 16 Jan 2014 16:53:56 +0000 (16:53 +0000)
committerjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 16 Jan 2014 16:53:56 +0000 (16:53 +0000)
This change returns the error code when they keyboard fails to read instead of potentially spinning endlessly.

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@15135 6f19259b-4bc3-4df7-8a09-765794883524

ShellPkg/Application/Shell/FileHandleWrappers.c

index c67ddfc2698f72e11df9e6f10bfa677ed60c6258..59c1ee55eeaec7ca8a1d7ca3ce73c6ef65a59eee 100644 (file)
@@ -417,7 +417,7 @@ FileInterfaceStdInRead(
     gBS->WaitForEvent (1, &gST->ConIn->WaitForKey, &EventIndex);\r
     Status = gST->ConIn->ReadKeyStroke (gST->ConIn, &Key);\r
     if (EFI_ERROR (Status)) {\r
-      continue;\r
+      break;\r
     }\r
 \r
     //\r
@@ -849,7 +849,7 @@ FileInterfaceStdInRead(
   //\r
   ASSERT(FoundFileList == NULL);\r
 \r
-  return EFI_SUCCESS;\r
+  return Status;\r
 }\r
 \r
 //\r