From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.24; helo=mga09.intel.com; envelope-from=jaben.carsey@intel.com; receiver=edk2-devel@lists.01.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (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 73B8F21148DD6 for ; Thu, 20 Sep 2018 07:22:20 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Sep 2018 07:22:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,398,1531810800"; d="scan'208";a="265245412" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga006.fm.intel.com with ESMTP; 20 Sep 2018 07:21:59 -0700 Received: from fmsmsx157.amr.corp.intel.com (10.18.116.73) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 20 Sep 2018 07:21:59 -0700 Received: from fmsmsx103.amr.corp.intel.com ([169.254.2.126]) by FMSMSX157.amr.corp.intel.com ([169.254.14.242]) with mapi id 14.03.0319.002; Thu, 20 Sep 2018 07:21:59 -0700 From: "Carsey, Jaben" To: krishnaLee , "edk2-devel@lists.01.org" Thread-Topic: [edk2] question about uefi shell-current working directory and shell-script Thread-Index: AQHUUMNto7Bu722AMUe1dkcCm8VD2qT5OK+g Date: Thu, 20 Sep 2018 14:21:58 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYTczYjBiYzMtNTQ1MS00YWRmLTkxZWYtY2RmYmMwYWJlMWIzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoidzFaUEhLMW94R0FGYUNGTnlNS0p5NDVKWVZOM0w3ZU9vTjJWbDZIY0RnWitBMkFPR3hiTUpvRkgxemRJck4rWiJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.1.200.107] MIME-Version: 1.0 Subject: Re: question about uefi shell-current working directory and shell-script X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Sep 2018 14:22:20 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable When the shell starts, it the prompt "shell>" or something like "fs0:>"... = The shell may not have a file system assigned yet so you cannot change dire= ctories until you pick a file system. > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of > krishnaLee > Sent: Thursday, September 20, 2018 2:22 AM > To: edk2-devel@lists.01.org > Subject: [edk2] question about uefi shell-current working directory and s= hell- > script > Importance: High >=20 > Hi, > I wonder if it is a bug: > I have a usb Fat32-disk,installed with EDK2 shell2.6 or 2.7, > the root directory has a startup.nsh,the startup.nsh has only one line:"c= d \", > I boot my cannolake machine with this usb disk, > in the uefi shell,I got a message:"cd: current directory not specified".i= t means > the cwd environment variable was not set when start doing script. >=20 >=20 > I think it may be an error,because the uefi shell can find the startup.n= sh,why > not set cwd(current working directory) before execute this script,so the = cd > command works fine. > I mention it because I found if I put a uefi application(using efi_shell_= protocol > to access .\logfile.txt) in this startup.nsh,the uefi application can't a= ccess files, > because I found the efi_shell_protocol need cwd to work too,such as > efi_shell_protocol.OpenFileByName(). >=20 >=20 >=20 >=20 >=20 >=20 > thank you, > krishna >=20 >=20 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel