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 BA6CF2116120E for ; Wed, 3 Oct 2018 11:17:53 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Oct 2018 11:17:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,336,1534834800"; d="scan'208";a="91896879" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga002.fm.intel.com with ESMTP; 03 Oct 2018 11:17:26 -0700 Received: from fmsmsx156.amr.corp.intel.com (10.18.116.74) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 3 Oct 2018 11:17:26 -0700 Received: from fmsmsx103.amr.corp.intel.com ([169.254.2.16]) by fmsmsx156.amr.corp.intel.com ([169.254.13.194]) with mapi id 14.03.0319.002; Wed, 3 Oct 2018 11:17:26 -0700 From: "Carsey, Jaben" To: "Jim.Dailey@dell.com" , "edk2-devel@lists.01.org" Thread-Topic: [edk2] [PATCH] ShellPkg: Create a homefilesystem environment variable Thread-Index: AdRbMjJ4cc1XSlJiRZyfjsjE3w8hwgAEhxQAAAA+shA= Date: Wed, 3 Oct 2018 18:17:26 +0000 Message-ID: References: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNjJkZTU2NmUtNTE2YS00NDYzLTk5ZGEtNjljOGE0M2Q1M2ZkIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoibEFXMHVhK1NiZ0FKK25zMDhRK05lZ0ZUaTFCNG9NenFBWmxSN0tnU2ljKzRqcWl4TWpDVytKc1kzdTdudlJCMyJ9 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: [PATCH] ShellPkg: Create a homefilesystem environment variable 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: Wed, 03 Oct 2018 18:17:53 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Pushed. c0b1f749ef1304810ed4ea58ded65b7f41d79d3e > -----Original Message----- > From: Carsey, Jaben > Sent: Wednesday, October 03, 2018 11:15 AM > To: 'Jim.Dailey@dell.com' ; edk2-devel@lists.01.org > Subject: RE: [edk2] [PATCH] ShellPkg: Create a homefilesystem environment > variable >=20 > Reviewed-by: Jaben Carsey >=20 > > -----Original Message----- > > From: Jim.Dailey@dell.com [mailto:Jim.Dailey@dell.com] > > Sent: Wednesday, October 03, 2018 9:02 AM > > To: edk2-devel@lists.01.org > > Cc: Carsey, Jaben ; Ni, Ruiyu > > > Subject: [edk2] [PATCH] ShellPkg: Create a homefilesystem environment > > variable > > Importance: High > > > > Create a homefilesystem environment variable whose value is the file > > system on which the executing shell is located. For example: "FS14:". > > > > This eliminates the need for people to have to try and find the "boot" > > file system in their startup script. After this change they can simply > > execute %homefilesystem% to set the cwd to the root of the file system > > where the shell is located. > > > > A future enhancement could be to add "homefilesystem" to the list of > > predefined, read-only variables listed in the EfiShellSetEnv function o= f > > file ShellProtocol.c > > > > Contributed-under: TianoCore Contribution Agreement 1.1 > > Signed-off-by: Jim Dailey > > --- > > ShellPkg/Application/Shell/Shell.c | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/ShellPkg/Application/Shell/Shell.c > > b/ShellPkg/Application/Shell/Shell.c > > index 3f3bcbb4b0..6185b6ac80 100644 > > --- a/ShellPkg/Application/Shell/Shell.c > > +++ b/ShellPkg/Application/Shell/Shell.c > > @@ -1169,6 +1169,8 @@ LocateStartupScript ( > > *TempSpot =3D CHAR_NULL; > > } > > > > + InternalEfiShellSetEnv(L"homefilesystem", StartupScriptPath, TRUE)= ; > > + > > StartupScriptPath =3D StrnCatGrow (&StartupScriptPath, &Size, > > ((FILEPATH_DEVICE_PATH *)FileDevicePath)->PathName, 0); > > PathRemoveLastItem (StartupScriptPath); > > StartupScriptPath =3D StrnCatGrow (&StartupScriptPath, &Size, > > mStartupScript, 0); > > -- > > 2.17.0.windows.1