All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Graf <agraf@suse.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/1] efi_loader: do not add \ in efi_fs_from_name()
Date: Sat, 23 Feb 2019 05:37:59 -0800	[thread overview]
Message-ID: <E74810E8-023F-4A21-8078-BBC3584E8749@suse.de> (raw)
In-Reply-To: <20190223102023.23393-1-xypron.glpk@gmx.de>



> Am 23.02.2019 um 02:20 schrieb Heinrich Schuchardt <xypron.glpk@gmx.de>:
> 
> In the `efidebug boot add` command we do not want a unsollicitated leading
> backslash added to the file name.
> 
> There is no good reason to mark a loaded file with a backslash as absolute.
> Anyway when reading files the file name will be interpreted as relative to
> root directory of the device.
> 
> So let's get rid of this backslash.
> 
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> ---
> lib/efi_loader/efi_device_path.c | 7 +------
> 1 file changed, 1 insertion(+), 6 deletions(-)
> 
> diff --git a/lib/efi_loader/efi_device_path.c b/lib/efi_loader/efi_device_path.c
> index 98c36e798f5..53b40c8c3c2 100644
> --- a/lib/efi_loader/efi_device_path.c
> +++ b/lib/efi_loader/efi_device_path.c
> @@ -985,12 +985,7 @@ efi_status_t efi_dp_from_name(const char *dev, const char *devnr,
>    if (!path)
>        return EFI_SUCCESS;
> 
> -    if (!is_net) {
> -        /* Add leading / to fs paths, because they're absolute */
> -        snprintf(filename, sizeof(filename), "/%s", path);
> -    } else {
> -        snprintf(filename, sizeof(filename), "%s", path);
> -    }
> +    snprintf(filename, sizeof(filename), "%s", path);

I'm pretty sure that code was there for a reason. Without, grub would not find its config file iirc.

Alex

>    /* DOS style file path: */
>    s = filename;
>    while ((s = strchr(s, '/')))
> -- 
> 2.20.1
> 

  reply	other threads:[~2019-02-23 13:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-23 10:20 [U-Boot] [PATCH 1/1] efi_loader: do not add \ in efi_fs_from_name() Heinrich Schuchardt
2019-02-23 13:37 ` Alexander Graf [this message]
2019-02-23 17:27   ` Heinrich Schuchardt
2019-02-24 17:46     ` Alexander Graf

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-all 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=E74810E8-023F-4A21-8078-BBC3584E8749@suse.de \
    --to=agraf@suse.de \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.