From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.136; helo=mga12.intel.com; envelope-from=jaben.carsey@intel.com; receiver=edk2-devel@lists.01.org Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) (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 5DE8921B02822 for ; Thu, 4 Oct 2018 13:54:23 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Oct 2018 13:54:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,341,1534834800"; d="scan'208";a="268539476" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga005.fm.intel.com with ESMTP; 04 Oct 2018 13:54:07 -0700 Received: from fmsmsx155.amr.corp.intel.com (10.18.116.71) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 4 Oct 2018 13:54:07 -0700 Received: from fmsmsx103.amr.corp.intel.com ([169.254.2.16]) by FMSMSX155.amr.corp.intel.com ([169.254.5.155]) with mapi id 14.03.0319.002; Thu, 4 Oct 2018 13:54:07 -0700 From: "Carsey, Jaben" To: Andrew Fish , Laszlo Ersek CC: "edk2-devel@lists.01.org" Thread-Topic: [edk2] [PATCH] ShellPkg: Create a homefilesystem environment variable Thread-Index: AdRbMjJ4cc1XSlJiRZyfjsjE3w8hwgAEhxQAAAA+shAAPoaYgAAEno6AAAtwFOA= Date: Thu, 4 Oct 2018 20:54:07 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNDI3YjM4NTUtOTM0NC00ZGRiLTkxMDQtYmZlYzVkZjRmMjdiIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiQTdZVUQ3eVQ5MmNYZEowM2tMVk41dkFHdWlnNFhqdk5wXC9PbWxmODJpeHVTNGlhcWlHQmRmRHg0WkVCdW1vTkYifQ== 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: Thu, 04 Oct 2018 20:54:24 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Laszlo, The leading "_" was required for out of spec, but built in, commands. The = spec has no restrictions on environment variables except some have special = meaning and may be read only. I can certainly work on slowing down the process. I have been complaining = about that same thing and should have been more aware. I would like to hav= e a community minimum amount of time before commits are done that we all ag= ree to. Something like 1 full day would be nice I think. -Jaben > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of > Andrew Fish > Sent: Thursday, October 04, 2018 12:20 PM > To: Laszlo Ersek > Cc: Carsey, Jaben ; edk2-devel@lists.01.org > Subject: Re: [edk2] [PATCH] ShellPkg: Create a homefilesystem environment > variable > Importance: High >=20 >=20 >=20 > > On Oct 4, 2018, at 10:07 AM, Laszlo Ersek wrote: > > > > On 10/03/18 20:17, Carsey, Jaben wrote: > >> Pushed. > >> c0b1f749ef1304810ed4ea58ded65b7f41d79d3e > > > > Please give other reviewers a bit more time than ~2 hours, to comment o= n > > the patch. :) > > > > I think I would have suggested an improvement (or a clarification about= ) > > the commit message. It says: > > > >>> -----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 > >>> > >>> Reviewed-by: Jaben Carsey > >>> > >>>> -----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:"= . > > > > that the file system in question contains the *shell*. > > > > So my first question would have been, what if the shell is memory mappe= d > > (from a firmware volume), but the platform doesn't expose firmware > > filesystems (FFSs) as EFI simple file system protocol instances? In tha= t > > case, the "file system on which the executing shell is located" seems > > ill-defined. > > >=20 > Same if the Shell was network booted. >=20 > Thanks, >=20 > Andrew Fish >=20 > >>>> > >>>> This eliminates the need for people to have to try and find the "boo= t" > >>>> file system in their startup script. After this change they can sim= ply > > > > Note, here the commit message refers to the startup script, not the > > shell itself. > > > >>>> execute %homefilesystem% to set the cwd to the root of the file > system > >>>> where the shell is located. > > > > I think the commit message here misses a "CD" command. > > > >>>> > >>>> A future enhancement could be to add "homefilesystem" to the list of > >>>> predefined, read-only variables listed in the EfiShellSetEnv functio= n of > >>>> file ShellProtocol.c > > > > Is it OK with the UEFI shell spec to define a shell variable called > > "homefilesystem"? I seem to remember that edk2-specific options for > > standard UEFI shell commands generally start with an underscore, to > > avoid clashing with the standard namespace. Does that apply to shell > > variables perhaps? (This is mostly for my own education.) > > > >>>> > >>>> 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); > >>>> + > > > > Again, this refers to the startup script, not the shell itself. > > > >>>> 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 > >> > >> _______________________________________________ > >> edk2-devel mailing list > >> edk2-devel@lists.01.org > >> https://lists.01.org/mailman/listinfo/edk2-devel > > >> > > > > Thanks > > Laszlo > > _______________________________________________ > > edk2-devel mailing list > > edk2-devel@lists.01.org > > https://lists.01.org/mailman/listinfo/edk2-devel > > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel