public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: <Jim.Dailey@dell.com>
To: <ruiyu.ni@Intel.com>
Cc: <jaben.carsey@intel.com>, <edk2-devel@lists.01.org>
Subject: Re: [PATCH 1/2] ShellPkg-Shell App: Provide fully-qualified path to shell scripts
Date: Thu, 25 Oct 2018 12:55:35 +0000	[thread overview]
Message-ID: <25edb40ae3344c1c9c9dcf5a35ac7c67@ausx13mps335.AMER.DELL.COM> (raw)
In-Reply-To: <9b85c690-dead-9a11-1701-047445dff2e4@Intel.com>

On Thursday, October 25, 2018 12:48 AM ruiyu.ni@Intel.com wrote:

>On 10/25/2018 12:35 AM, Jim.Dailey@dell.com wrote:
>> Add a function to return the fully-qualified version of some path.
>> 
>> ...
>> +CHAR16*
>> +EFIAPI
>> +FullyQualifyPath(
>> +  IN OUT    CHAR16     **Path
>This API assumes *Path is allocated in heap which may bring unnecessary 
>restriction. How about we accept a CONST CHAR16 * Path, quality and 
>return a new allocated string?
>The parameter can be "IN CONST CHAR16 *Path".

In the context it is currently used, *Path is allocated in heap. But,
it might be better to handle other types of input too.

>> +  if (StrStr(*Path, L":") == NULL) {
>
>Do we need to handle path like "fs0:a.txt"?
>In Windows, it is expanded to <Current Directory of FS0> + a.txt.

Good catch.

>> +        *Path = FullyQualifiedPath;
>
>We can just return the FullQualifiedPath without changing Path.

Agreed.

>Thanks,
>Ray

I'll take a cut at version 2 soon.

Regards,
Jim

      reply	other threads:[~2018-10-25 12:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-24 16:35 [PATCH 1/2] ShellPkg-Shell App: Provide fully-qualified path to shell scripts Jim.Dailey
2018-10-24 18:07 ` Carsey, Jaben
2018-10-25  5:47 ` Ni, Ruiyu
2018-10-25 12:55   ` Jim.Dailey [this message]

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=25edb40ae3344c1c9c9dcf5a35ac7c67@ausx13mps335.AMER.DELL.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