public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Manuel Traut <manuel.traut@mt.com>
To: u-boot@lists.denx.de
Cc: vagrant@debian.org
Subject: [PATCH] distro/pxeboot: Handle prompt variable
Date: Fri, 18 Nov 2022 09:00:27 +0100	[thread overview]
Message-ID: <Y3c7m/x+5hHFRH+d@mt.com> (raw)

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

             reply	other threads:[~2022-11-18 12:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-18  8:00 Manuel Traut [this message]
2022-11-27 14:35 ` [PATCH] distro/pxeboot: Handle prompt variable Simon Glass
2022-12-12 15:02   ` AW: " Traut Manuel LCPF-CH
2022-12-12 21:35 ` Tom Rini

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=Y3c7m/x+5hHFRH+d@mt.com \
    --to=manuel.traut@mt.com \
    --cc=u-boot@lists.denx.de \
    --cc=vagrant@debian.org \
    /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