diff options
author | Rob Herring <rob.herring@calxeda.com> | 2012-03-28 05:51:34 (GMT) |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2012-06-21 20:34:45 (GMT) |
commit | 7815c4e89fbf2ce91c740a7aa110f1ff7b35b8ed (patch) | |
tree | aed306e31c3c6d57522ec24d6b374ec522dcaaab | |
parent | 1e08522699fcfe906692024a839fd4a5fc7749f5 (diff) | |
download | u-boot-fsl-qoriq-7815c4e89fbf2ce91c740a7aa110f1ff7b35b8ed.tar.xz |
pxe: add support for label menu text
Use a menu string if present, otherwise use the kernel string.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
-rw-r--r-- | common/cmd_pxe.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/common/cmd_pxe.c b/common/cmd_pxe.c index 5949b24..9b4f0e0 100644 --- a/common/cmd_pxe.c +++ b/common/cmd_pxe.c @@ -409,6 +409,7 @@ static int get_relfile_envaddr(char *file_path, char *envaddr_name) */ struct pxe_label { char *name; + char *menu; char *kernel; char *append; char *initrd; @@ -491,17 +492,18 @@ static void label_destroy(struct pxe_label *label) static void label_print(void *data) { struct pxe_label *label = data; + const char *c = label->menu ? label->menu : label->kernel; - printf("Label: %s\n", label->name); + printf("%s:\t%s\n", label->name, c); if (label->kernel) - printf("\tkernel: %s\n", label->kernel); + printf("\t\tkernel: %s\n", label->kernel); if (label->append) - printf("\tappend: %s\n", label->append); + printf("\t\tappend: %s\n", label->append); if (label->initrd) - printf("\tinitrd: %s\n", label->initrd); + printf("\t\tinitrd: %s\n", label->initrd); } /* @@ -970,6 +972,9 @@ static int parse_label_menu(char **c, struct pxe_menu *cfg, return -ENOMEM; break; + case T_LABEL: + parse_sliteral(c, &label->menu); + break; default: printf("Ignoring malformed menu command: %.*s\n", (int)(*c - s), s); |