public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH] distro/pxeboot: Handle prompt variable
@ 2022-11-18  8:00 Manuel Traut
  2022-11-27 14:35 ` Simon Glass
  2022-12-12 21:35 ` Tom Rini
  0 siblings, 2 replies; 4+ messages in thread
From: Manuel Traut @ 2022-11-18  8:00 UTC (permalink / raw)
  To: u-boot; +Cc: vagrant

Regarding the documentation found here:
https://github.com/u-boot/u-boot/blob/master/common/menu.c#L347

If both timeout and prompt is set to 0 the default entry shall
be booted immediately. However the current behaviour is that
the prompt is shown (tested with distroboot) until the user
selects an entry (no timeout).

This change implements a behaviour as documented. It was tested
with distroboot.

Signed-off-by: Manuel Traut <manuel.traut@mt.com>
---
 boot/pxe_utils.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/boot/pxe_utils.c b/boot/pxe_utils.c
index 8133006875..075a0f2830 100644
--- a/boot/pxe_utils.c
+++ b/boot/pxe_utils.c
@@ -1359,7 +1359,10 @@ static int parse_pxefile_top(struct pxe_context *ctx, char *p, unsigned long bas
 			break;
 
 		case T_PROMPT:
-			eol_or_eof(&p);
+			err = parse_integer(&p, &cfg->prompt);
+			// Do not fail if prompt configuration is undefined
+			if (err <  0)
+				eol_or_eof(&p);
 			break;
 
 		case T_EOL:
-- 
2.35.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] distro/pxeboot: Handle prompt variable
  2022-11-18  8:00 [PATCH] distro/pxeboot: Handle prompt variable Manuel Traut
@ 2022-11-27 14:35 ` Simon Glass
  2022-12-12 15:02   ` AW: " Traut Manuel LCPF-CH
  2022-12-12 21:35 ` Tom Rini
  1 sibling, 1 reply; 4+ messages in thread
From: Simon Glass @ 2022-11-27 14:35 UTC (permalink / raw)
  To: Manuel Traut; +Cc: u-boot, vagrant

On Fri, 18 Nov 2022 at 05:36, Manuel Traut <manuel.traut@mt.com> wrote:
>
> Regarding the documentation found here:
> https://github.com/u-boot/u-boot/blob/master/common/menu.c#L347
>
> If both timeout and prompt is set to 0 the default entry shall
> be booted immediately. However the current behaviour is that
> the prompt is shown (tested with distroboot) until the user
> selects an entry (no timeout).
>
> This change implements a behaviour as documented. It was tested
> with distroboot.
>
> Signed-off-by: Manuel Traut <manuel.traut@mt.com>
> ---
>  boot/pxe_utils.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)

Reviewed-by: Simon Glass <sjg@chromium.org>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* AW: [PATCH] distro/pxeboot: Handle prompt variable
  2022-11-27 14:35 ` Simon Glass
@ 2022-12-12 15:02   ` Traut Manuel LCPF-CH
  0 siblings, 0 replies; 4+ messages in thread
From: Traut Manuel LCPF-CH @ 2022-12-12 15:02 UTC (permalink / raw)
  To: u-boot@lists.denx.de
  Cc: vagrant@debian.org, Simon Glass, Ramon Fried, Artem Lapkin,
	Heinrich Schuchardt, Amjad Ouled-Ameur, Masahisa Kojima, Tom Rini

Can this be picked for next?

-----Ursprüngliche Nachricht-----
Von: Simon Glass <sjg@chromium.org> 
Gesendet: Sonntag, 27. November 2022 15:36
An: Traut Manuel LCPF-CH <Manuel.Traut@mt.com>
Cc: u-boot@lists.denx.de; vagrant@debian.org
Betreff: Re: EXTERNAL - [PATCH] distro/pxeboot: Handle prompt variable

On Fri, 18 Nov 2022 at 05:36, Manuel Traut <manuel.traut@mt.com> wrote:
>
> Regarding the documentation found here:
> https://github.com/u-boot/u-boot/blob/master/common/menu.c#L347
>
> If both timeout and prompt is set to 0 the default entry shall be 
> booted immediately. However the current behaviour is that the prompt 
> is shown (tested with distroboot) until the user selects an entry (no 
> timeout).
>
> This change implements a behaviour as documented. It was tested with 
> distroboot.
>
> Signed-off-by: Manuel Traut <manuel.traut@mt.com>
> ---
>  boot/pxe_utils.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)

Reviewed-by: Simon Glass <sjg@chromium.org>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] distro/pxeboot: Handle prompt variable
  2022-11-18  8:00 [PATCH] distro/pxeboot: Handle prompt variable Manuel Traut
  2022-11-27 14:35 ` Simon Glass
@ 2022-12-12 21:35 ` Tom Rini
  1 sibling, 0 replies; 4+ messages in thread
From: Tom Rini @ 2022-12-12 21:35 UTC (permalink / raw)
  To: Manuel Traut; +Cc: u-boot, vagrant

[-- Attachment #1: Type: text/plain, Size: 695 bytes --]

On Fri, Nov 18, 2022 at 09:00:27AM +0100, Manuel Traut wrote:

> Regarding the documentation found here:
> https://github.com/u-boot/u-boot/blob/master/common/menu.c#L347
> 
> If both timeout and prompt is set to 0 the default entry shall
> be booted immediately. However the current behaviour is that
> the prompt is shown (tested with distroboot) until the user
> selects an entry (no timeout).
> 
> This change implements a behaviour as documented. It was tested
> with distroboot.
> 
> Signed-off-by: Manuel Traut <manuel.traut@mt.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>
> Reviewed-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/next, thanks!

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-12-12 21:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-18  8:00 [PATCH] distro/pxeboot: Handle prompt variable Manuel Traut
2022-11-27 14:35 ` Simon Glass
2022-12-12 15:02   ` AW: " Traut Manuel LCPF-CH
2022-12-12 21:35 ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox