From fb578a53288ecf8b0d9bbc5ebfbaead6f5b9a5e9 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 26 Apr 2014 10:50:14 -0500 Subject: [PATCH 37/37] PXE: syslinux implenets some keywords found in configs we do not support distros write out extlinux.conf files and documentation lists pxe config options we do not support. today the user gets ugly messages like: Ignoring unknown command: ui Ignoring malformed menu command: autoboot Ignoring malformed menu command: hidden Ignoring unknown command: totaltimeout instead fo printing the messages for known but unsupported options lets silently pass over them. --- common/cmd_pxe.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/common/cmd_pxe.c b/common/cmd_pxe.c index eb5f9c3..18e140d 100644 --- a/common/cmd_pxe.c +++ b/common/cmd_pxe.c @@ -825,7 +825,8 @@ enum token_type { T_FDTDIR, T_ONTIMEOUT, T_IPAPPEND, - T_INVALID + T_INVALID, + T_UNIMPLEMENTED }; /* @@ -858,6 +859,10 @@ static const struct token keywords[] = { {"fdtdir", T_FDTDIR}, {"ontimeout", T_ONTIMEOUT,}, {"ipappend", T_IPAPPEND,}, + {"ui", T_UNIMPLEMENTED}, + {"autoboot", T_UNIMPLEMENTED}, + {"hidden", T_UNIMPLEMENTED}, + {"totaltimeout", T_UNIMPLEMENTED}, {NULL, T_INVALID} }; @@ -1127,6 +1132,9 @@ static int parse_menu(cmd_tbl_t *cmdtp, char **c, struct pxe_menu *cfg, char *b, nest_level + 1); break; + case T_UNIMPLEMENTED: + break; + default: printf("Ignoring malformed menu command: %.*s\n", (int)(*c - s), s); @@ -1351,6 +1359,9 @@ static int parse_pxefile_top(cmd_tbl_t *cmdtp, char *p, struct pxe_menu *cfg, in case T_EOF: return 1; + case T_UNIMPLEMENTED: + break; + default: printf("Ignoring unknown command: %.*s\n", (int)(p - s), s); -- 1.9.0