From: "Ni, Ruiyu" <ruiyu.ni@Intel.com>
To: Jim.Dailey@dell.com, edk2-devel@lists.01.org
Cc: jaben.carsey@intel.com
Subject: Re: [PATCH] ShellPkg: Create a homefilesystem environment variable
Date: Mon, 8 Oct 2018 14:42:24 +0800 [thread overview]
Message-ID: <3f099bb0-8686-1daf-d283-c2910ada825e@Intel.com> (raw)
In-Reply-To: <ae7ca27cc6ff410586d9065a9b2c43f3@ausx13mps335.AMER.DELL.COM>
On 10/4/2018 12:02 AM, Jim.Dailey@dell.com wrote:
> 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 of
> file ShellProtocol.c
>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Jim Dailey <jim_dailey@dell.com>
> ---
> 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);
> +
> StartupScriptPath = StrnCatGrow (&StartupScriptPath, &Size, ((FILEPATH_DEVICE_PATH *)FileDevicePath)->PathName, 0);
> PathRemoveLastItem (StartupScriptPath);
> StartupScriptPath = StrnCatGrow (&StartupScriptPath, &Size, mStartupScript, 0);
>
Jim,
Creating spec-undefined "homefilesystem" ENV variable is not a good idea
in my opinion.
Can you submit a Shell Spec change and change the implementation once
the spec change is approved?
--
Thanks,
Ray
next prev parent reply other threads:[~2018-10-08 6:41 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-03 16:02 [PATCH] ShellPkg: Create a homefilesystem environment variable Jim.Dailey
2018-10-03 18:15 ` Carsey, Jaben
2018-10-03 18:17 ` Carsey, Jaben
2018-10-04 17:07 ` Laszlo Ersek
2018-10-04 19:05 ` Jim.Dailey
2018-10-04 19:20 ` Laszlo Ersek
2018-10-04 19:19 ` Andrew Fish
2018-10-04 20:54 ` Carsey, Jaben
2018-10-05 11:32 ` Laszlo Ersek
2018-10-05 12:19 ` Tim Lewis
2018-10-09 4:33 ` Ni, Ruiyu
2018-10-05 15:00 ` Carsey, Jaben
2018-10-05 17:47 ` Laszlo Ersek
2018-10-08 6:42 ` Ni, Ruiyu [this message]
2018-10-08 13:58 ` Jim.Dailey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3f099bb0-8686-1daf-d283-c2910ada825e@Intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox