public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: AKASHI Takahiro <takahiro.akashi@linaro.org>
To: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: u-boot@lists.denx.de, Masahisa Kojima <masahisa.kojima@linaro.org>
Subject: Re: [PATCH 2/2] efi_loader: create boot options without file path
Date: Sun, 12 Jun 2022 10:21:55 +0900	[thread overview]
Message-ID: <20220612012155.GA5982@laputa> (raw)
In-Reply-To: <20220611052208.18612-3-xypron.glpk@gmx.de>

On Sat, Jun 11, 2022 at 05:22:08AM +0000, Heinrich Schuchardt wrote:
> Allow creating boot options without file path, e.g.
> 
>     efidebug boot add -b 0001 'short dev only' host 0:1 ''
>     efidebug boot add -B 0002 'long dev only' host 0:1 ''

So the "subject" is a bit misleading.
Your intension is to expand "efidebug", not uefi functionality.

> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> ---
>  lib/efi_loader/efi_device_path.c | 14 ++++++++------
>  1 file changed, 8 insertions(+), 6 deletions(-)
> 
> diff --git a/lib/efi_loader/efi_device_path.c b/lib/efi_loader/efi_device_path.c
> index 50a988c561..c511abcd5e 100644
> --- a/lib/efi_loader/efi_device_path.c
> +++ b/lib/efi_loader/efi_device_path.c
> @@ -1002,12 +1002,14 @@ struct efi_device_path *efi_dp_from_file(struct blk_desc *desc, int part,
>  		buf = dp_part_fill(buf, desc, part);
> 
>  	/* add file-path: */
> -	fp = buf;
> -	fp->dp.type = DEVICE_PATH_TYPE_MEDIA_DEVICE;
> -	fp->dp.sub_type = DEVICE_PATH_SUB_TYPE_FILE_PATH;
> -	fp->dp.length = (u16)fpsize;
> -	path_to_uefi(fp->str, path);
> -	buf += fpsize;
> +	if (*path) {
> +		fp = buf;
> +		fp->dp.type = DEVICE_PATH_TYPE_MEDIA_DEVICE;
> +		fp->dp.sub_type = DEVICE_PATH_SUB_TYPE_FILE_PATH;
> +		fp->dp.length = (u16)fpsize;
> +		path_to_uefi(fp->str, path);
> +		buf += fpsize;
> +	}

Please update the function description, too.
With your change, the current is no more enough.

-Takahiro Akashi


>  	*((struct efi_device_path *)buf) = END;
> 
> --
> 2.36.1
> 

      reply	other threads:[~2022-06-12  1:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-11  5:22 [PATCH 0/2] efi_loader: allow booting from short dev only DP Heinrich Schuchardt
2022-06-11  5:22 ` [PATCH 1/2] " Heinrich Schuchardt
2022-06-11  5:22 ` [PATCH 2/2] efi_loader: create boot options without file path Heinrich Schuchardt
2022-06-12  1:21   ` AKASHI Takahiro [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-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=20220612012155.GA5982@laputa \
    --to=takahiro.akashi@linaro.org \
    --cc=masahisa.kojima@linaro.org \
    --cc=u-boot@lists.denx.de \
    --cc=xypron.glpk@gmx.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox