]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ShellPkg: Fix Shell to not return without startup.nsh after timeout
authorRuiyu Ni <ruiyu.ni@intel.com>
Fri, 7 Apr 2017 03:02:47 +0000 (11:02 +0800)
committerRuiyu Ni <ruiyu.ni@intel.com>
Fri, 7 Apr 2017 03:06:12 +0000 (11:06 +0800)
When user doesn't press key to exit the timeout waiting in Shell,
and there is no startup.nsh, Shell exits with failure status.
aaf51f08ee104447207bba571649556095befc93 introduced this bug.
The patch fixes this issue.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Chen A Chen <chen.a.chen@intel.com>
ShellPkg/Application/Shell/Shell.c

index e91b964d7bf5b914cf7021d6c9fcf409b5a500a8..4383298aab726e50b9b0b6cb1b5b0ef5f9792d60 100644 (file)
@@ -1279,6 +1279,11 @@ DoStartupScript(
   if (FileStringPath != NULL) {\r
     Status = RunScriptFile (FileStringPath, NULL, L"", ShellInfoObject.NewShellParametersProtocol);\r
     FreePool (FileStringPath);\r
+  } else {\r
+    //\r
+    // we return success since startup script is not mandatory.\r
+    //\r
+    Status = EFI_SUCCESS;\r
   }\r
 \r
   return (Status);\r