From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=17.151.62.66; helo=nwk-aaemail-lapp01.apple.com; envelope-from=afish@apple.com; receiver=edk2-devel@lists.01.org Received: from nwk-aaemail-lapp01.apple.com (nwk-aaemail-lapp01.apple.com [17.151.62.66]) (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 5C25C21A00AE6 for ; Thu, 4 Oct 2018 12:19:54 -0700 (PDT) Received: from pps.filterd (nwk-aaemail-lapp01.apple.com [127.0.0.1]) by nwk-aaemail-lapp01.apple.com (8.16.0.22/8.16.0.22) with SMTP id w94JGubB006847; Thu, 4 Oct 2018 12:19:49 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apple.com; h=mime-version : content-type : sender : from : message-id : subject : date : in-reply-to : cc : to : references; s=20180706; bh=KFl1FjxJMKNZGYXJKHWH4p4EF0U0jPNS+DaZVSAhWB0=; b=NI6G551qUy66voX/a7mAgcftYtzeTaega1m0BXwWgBRM8Sl2eExEDqFZSmsv7ezERWc9 hCxkjF4yU9rrGAcn2W4gis6weQeoeZsne8YOPXfFxIzf2ittCgYClAkAeGm2uf+n7r0s 9Ekdnv51uE30y9swZqdiEqboCftp/R3pcVw6E5oJ6/fOtcLzRnACPWx4wfQwOPunYDmU BXgXT4Fq2YNgZvbUdnFtBhTQt/Doca/qna8Url/vr2orNXY6RbfUIQmTgoAR2edUDOnv 4vHT3YwZwhfSOUvL7qcAaniHPdlxPpYiZFRNFwkg+OdUE4x41oaPMc5/FWHPXq2THJlO cg== Received: from ma1-mtap-s03.corp.apple.com (ma1-mtap-s03.corp.apple.com [17.40.76.7]) by nwk-aaemail-lapp01.apple.com with ESMTP id 2mt8b8y40k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Thu, 04 Oct 2018 12:19:48 -0700 MIME-version: 1.0 Received: from nwk-mmpp-sz09.apple.com (nwk-mmpp-sz09.apple.com [17.128.115.80]) by ma1-mtap-s03.corp.apple.com (Oracle Communications Messaging Server 8.0.2.3.20180614 64bit (built Jun 14 2018)) with ESMTPS id <0PG3005569OZVU70@ma1-mtap-s03.corp.apple.com>; Thu, 04 Oct 2018 12:19:48 -0700 (PDT) Received: from process_viserion-daemon.nwk-mmpp-sz09.apple.com by nwk-mmpp-sz09.apple.com (Oracle Communications Messaging Server 8.0.2.3.20180614 64bit (built Jun 14 2018)) id <0PG300D009EH9500@nwk-mmpp-sz09.apple.com>; Thu, 04 Oct 2018 12:19:48 -0700 (PDT) X-Va-A: X-Va-T-CD: 07a9f7dd315dc6000695a0402a47d12d X-Va-E-CD: f2120d7c9cb68004a326e5656301b4c1 X-Va-R-CD: 8607101446a8ea8099cabf33593f32d6 X-Va-CD: 0 X-Va-ID: 3714650c-346c-4bd8-a93a-962f3e75d909 X-V-A: X-V-T-CD: 13715775cfe6ed78bc954dbcb503dbb2 X-V-E-CD: f2120d7c9cb68004a326e5656301b4c1 X-V-R-CD: 8607101446a8ea8099cabf33593f32d6 X-V-CD: 0 X-V-ID: 28dcb6b1-16d0-4bf7-8d1b-90b0f6dd4978 Received: from process_milters-daemon.nwk-mmpp-sz09.apple.com by nwk-mmpp-sz09.apple.com (Oracle Communications Messaging Server 8.0.2.3.20180614 64bit (built Jun 14 2018)) id <0PG300F009LR1300@nwk-mmpp-sz09.apple.com>; Thu, 04 Oct 2018 12:19:48 -0700 (PDT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-10-04_08:,, signatures=0 X-Proofpoint-Scanner-Instance: nwk-grpmailp-qapp18.corp.apple.com-10000_instance1 Received: from [17.235.16.120] (unknown [17.235.16.120]) by nwk-mmpp-sz09.apple.com (Oracle Communications Messaging Server 8.0.2.3.20180614 64bit (built Jun 14 2018)) with ESMTPSA id <0PG300EKX9OYEQA0@nwk-mmpp-sz09.apple.com>; Thu, 04 Oct 2018 12:19:47 -0700 (PDT) Sender: afish@apple.com From: Andrew Fish Message-id: Date: Thu, 04 Oct 2018 12:19:39 -0700 In-reply-to: Cc: "Carsey, Jaben" , "Jim.Dailey@dell.com" , "edk2-devel@lists.01.org" To: Laszlo Ersek References: X-Mailer: Apple Mail (2.3445.6.18) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-10-04_08:, , signatures=0 X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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 19:19:54 -0000 Content-Type: text/plain; CHARSET=US-ASCII Content-Transfer-Encoding: 7BIT > 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 on > 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 mapped > (from a firmware volume), but the platform doesn't expose firmware > filesystems (FFSs) as EFI simple file system protocol instances? In that > case, the "file system on which the executing shell is located" seems > ill-defined. > Same if the Shell was network booted. Thanks, Andrew Fish >>>> >>>> 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 > > 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 function 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 = CHAR_NULL; >>>> } >>>> >>>> + InternalEfiShellSetEnv(L"homefilesystem", StartupScriptPath, TRUE); >>>> + > > Again, this refers to the startup script, not the shell itself. > >>>> StartupScriptPath = StrnCatGrow (&StartupScriptPath, &Size, >>>> ((FILEPATH_DEVICE_PATH *)FileDevicePath)->PathName, 0); >>>> PathRemoveLastItem (StartupScriptPath); >>>> StartupScriptPath = 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