From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=209.132.183.28; helo=mx1.redhat.com; envelope-from=lersek@redhat.com; receiver=edk2-devel@lists.01.org Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (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 651BC2112DF76 for ; Thu, 4 Oct 2018 12:20:24 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id EFA6674F01; Thu, 4 Oct 2018 19:20:23 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-120-104.rdu2.redhat.com [10.10.120.104]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0B5AA5DD72; Thu, 4 Oct 2018 19:20:22 +0000 (UTC) To: Jim.Dailey@dell.com Cc: jaben.carsey@intel.com, edk2-devel@lists.01.org References: <720fd675cf8848eb8107b4efda23446c@ausx13mps335.AMER.DELL.COM> From: Laszlo Ersek Message-ID: Date: Thu, 4 Oct 2018 21:20:20 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <720fd675cf8848eb8107b4efda23446c@ausx13mps335.AMER.DELL.COM> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Thu, 04 Oct 2018 19:20:24 +0000 (UTC) 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:20:25 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 10/04/18 21:05, Jim.Dailey@dell.com wrote: >> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Laszlo Ersek > > I'll attempt answer some of your questions, but Jaben may have to > answer some of them (like his commit speed :-) or questions about what > the shell spec allows). > >> >> 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. > > In such a case homefilesystem will not get defined, I think. OK, thanks. > >>>>> 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. > > The shell does not handle "cd fsN:". But "fsN:" does work. I suppose > one could always add a "cd \" after "%hoemfilesystem%", but I think it > will not have any effect in most (all?) cases where homefilesystem is > defined. My mistake. >>>>> + InternalEfiShellSetEnv(L"homefilesystem", StartupScriptPath, TRUE); >>>>> + >> >> Again, this refers to the startup script, not the shell itself. > > The variable's name implies the startup script, but at the point it is > used, it contains only the file system where the shell itself was found. > Code following this continues to modify the variable's value until it > eventually does point to where the startup script *might* be. Thanks for explaining! Laszlo