From nobody Sat Nov 2 10:22:20 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zoho.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1491534227587154.59794207540517; Thu, 6 Apr 2017 20:03:47 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 7C10820D77DC6; Thu, 6 Apr 2017 20:03:46 -0700 (PDT) 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) 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 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 X-Original-To: edk2-devel@lists.01.org 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==; X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,162,1488873600"; d="scan'208";a="85732809" From: Ruiyu Ni To: edk2-devel@lists.01.org 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: [edk2] [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: , Cc: Chen A Chen MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Jaben Carsey --- ShellPkg/Application/Shell/Shell.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ShellPkg/Application/Shell/Shell.c b/ShellPkg/Application/Shel= l/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 !=3D NULL) { Status =3D RunScriptFile (FileStringPath, NULL, L"", ShellInfoObject.N= ewShellParametersProtocol); FreePool (FileStringPath); + } else { + // + // we return success since startup script is not mandatory. + // + Status =3D EFI_SUCCESS; } =20 return (Status); --=20 2.9.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel