Skip to contentSkip to conversation

distro/pxeboot: Handle prompt variable

PATCH In review Manuel Traut 3 participants 4 messages Nov 18, 2022 – Dec 12, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 boot/pxe_utils.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
boot/pxe_utils.c +4 -1
index 8133006875..075a0f2830 100644
@@ -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:
Signature · 1 line
2.35.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Manuel Traut

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).

Quoted 7 lines

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

---
 boot/pxe_utils.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
author Reviewed-by Simon Glass
#2 lore raw

Can this be picked for next?

-----Ursprüngliche Nachricht-----
Von: Simon Glass <[email protected]>
Gesendet: Sonntag, 27. November 2022 15:36
An: Traut Manuel LCPF-CH <[email protected]>
Cc: [email protected]; [email protected]
Betreff: Re: EXTERNAL - [PATCH] distro/pxeboot: Handle prompt variable

Quoted 9 lines · Manuel Traut

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).

Quoted 7 lines

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

---
 boot/pxe_utils.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
#3 lore raw
In reply to Manuel Traut
Quoted 8 lines · Manuel Traut

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).

Quoted 6 lines

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

Applied to u-boot/next, thanks!

Signature · 1 line
Tom