public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] ShellPkg: Fix Shell to not return without startup.nsh after timeout
@ 2017-04-07  3:03 Ruiyu Ni
  2017-04-07 15:22 ` Carsey, Jaben
  0 siblings, 1 reply; 2+ messages in thread
From: Ruiyu Ni @ 2017-04-07  3:03 UTC (permalink / raw)
  To: edk2-devel; +Cc: Chen A Chen

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>
Cc: Chen A Chen <chen.a.chen@intel.com>
---
 ShellPkg/Application/Shell/Shell.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/ShellPkg/Application/Shell/Shell.c b/ShellPkg/Application/Shell/Shell.c
index e91b964..4383298 100644
--- a/ShellPkg/Application/Shell/Shell.c
+++ b/ShellPkg/Application/Shell/Shell.c
@@ -1279,6 +1279,11 @@ DoStartupScript(
   if (FileStringPath != NULL) {
     Status = RunScriptFile (FileStringPath, NULL, L"", ShellInfoObject.NewShellParametersProtocol);
     FreePool (FileStringPath);
+  } else {
+    //
+    // we return success since startup script is not mandatory.
+    //
+    Status = EFI_SUCCESS;
   }
 
   return (Status);
-- 
2.9.0.windows.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ShellPkg: Fix Shell to not return without startup.nsh after timeout
  2017-04-07  3:03 [PATCH] ShellPkg: Fix Shell to not return without startup.nsh after timeout Ruiyu Ni
@ 2017-04-07 15:22 ` Carsey, Jaben
  0 siblings, 0 replies; 2+ messages in thread
From: Carsey, Jaben @ 2017-04-07 15:22 UTC (permalink / raw)
  To: Ni, Ruiyu, edk2-devel@lists.01.org; +Cc: Chen, Chen A

Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>

> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
> Ruiyu Ni
> Sent: Thursday, April 06, 2017 8:04 PM
> To: edk2-devel@lists.01.org
> Cc: Chen, Chen A <chen.a.chen@intel.com>
> Subject: [edk2] [PATCH] ShellPkg: Fix Shell to not return without startup.nsh
> after timeout
> Importance: High
> 
> 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>
> Cc: Chen A Chen <chen.a.chen@intel.com>
> ---
>  ShellPkg/Application/Shell/Shell.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/ShellPkg/Application/Shell/Shell.c
> b/ShellPkg/Application/Shell/Shell.c
> index e91b964..4383298 100644
> --- a/ShellPkg/Application/Shell/Shell.c
> +++ b/ShellPkg/Application/Shell/Shell.c
> @@ -1279,6 +1279,11 @@ DoStartupScript(
>    if (FileStringPath != NULL) {
>      Status = RunScriptFile (FileStringPath, NULL, L"",
> ShellInfoObject.NewShellParametersProtocol);
>      FreePool (FileStringPath);
> +  } else {
> +    //
> +    // we return success since startup script is not mandatory.
> +    //
> +    Status = EFI_SUCCESS;
>    }
> 
>    return (Status);
> --
> 2.9.0.windows.1
> 
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-04-07 15:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-07  3:03 [PATCH] ShellPkg: Fix Shell to not return without startup.nsh after timeout Ruiyu Ni
2017-04-07 15:22 ` Carsey, Jaben

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox