From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 7253F20D77DC6 for ; Thu, 6 Apr 2017 20:03:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1491534225; x=1523070225; h=from:to:cc:subject:date:message-id; bh=cUK/YL0VEjr8dfieZBOXlwtK2dcHrshMtsZIvdGnXQA=; b=DhWXl07yxDdcUFYgVpTfM/U7m5xgqUbKGOvyRGEu7z2lk+SanhIaloeM TA9oslV1qaI5VKu7QAa3I/XsvORjCw==; Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Apr 2017 20:03:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,162,1488873600"; d="scan'208";a="85732809" Received: from ray-dev.ccr.corp.intel.com ([10.239.9.25]) by fmsmga005.fm.intel.com with ESMTP; 06 Apr 2017 20:03:44 -0700 From: Ruiyu Ni To: edk2-devel@lists.01.org Cc: Chen A Chen Date: Fri, 7 Apr 2017 11:03:41 +0800 Message-Id: <20170407030341.245636-1-ruiyu.ni@intel.com> X-Mailer: git-send-email 2.9.0.windows.1 Subject: [PATCH] ShellPkg: Fix Shell to not return without startup.nsh after timeout X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Apr 2017 03:03:45 -0000 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 Cc: Chen A Chen --- 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