summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManuel Traut <manuel.traut@mt.com>2022-11-18 09:00:27 +0100
committerTom Rini <trini@konsulko.com>2022-12-12 14:03:12 -0500
commit739e8361f3fe78038251216df6096a32bc2d5839 (patch)
tree2b51c00552864ef8e23d3001d3294e905a2b81c3
parent51c5c28af59c19407d6602336ac7374dd1432c49 (diff)
distro/pxeboot: Handle prompt variable
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>
-rw-r--r--boot/pxe_utils.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/boot/pxe_utils.c b/boot/pxe_utils.c
index c613818d0b3..27243138176 100644
--- a/boot/pxe_utils.c
+++ b/boot/pxe_utils.c
@@ -1368,7 +1368,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: