[U-Boot,06/10] pxe: always display a menu when present

Submitted by Rob Herring on Dec. 3, 2012, 3 a.m.

Details

Message ID 1354503629-25621-7-git-send-email-robherring2@gmail.com
State Accepted
Delegated to: Joe Hershberger
Headers show

Commit Message

Rob Herring Dec. 3, 2012, 3 a.m.
From: Rob Herring <rob.herring@calxeda.com>

The prompt flag is for displaying a "boot:" prompt in pxelinux. This
doesn't make sense for u-boot as we don't support the pxelinux command
interface. So we should just ignore prompt statements and always show the
menu if a menu is present.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
---
 common/cmd_pxe.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/common/cmd_pxe.c b/common/cmd_pxe.c
index cad5d36..85a27e0 100644
--- a/common/cmd_pxe.c
+++ b/common/cmd_pxe.c
@@ -1154,6 +1154,7 @@  static int parse_pxefile_top(char *p, struct pxe_menu *cfg, int nest_level)
 		err = 0;
 		switch (t.type) {
 		case T_MENU:
+			cfg->prompt = 1;
 			err = parse_menu(&p, cfg, b, nest_level);
 			break;
 
@@ -1183,7 +1184,7 @@  static int parse_pxefile_top(char *p, struct pxe_menu *cfg, int nest_level)
 			break;
 
 		case T_PROMPT:
-			err = parse_integer(&p, &cfg->prompt);
+			eol_or_eof(&p);
 			break;
 
 		case T_EOL: