Lines Matching refs:cfg

1072 	struct pxe_menu *cfg, int nest_level);
1083 struct pxe_menu *cfg, int nest_level) in handle_include() argument
1107 ret = parse_pxefile_top(cmdtp, buf, base, cfg, nest_level); in handle_include()
1123 static int parse_menu(cmd_tbl_t *cmdtp, char **c, struct pxe_menu *cfg, in parse_menu() argument
1134 err = parse_sliteral(c, &cfg->title); in parse_menu()
1139 err = handle_include(cmdtp, c, base, cfg, in parse_menu()
1159 static int parse_label_menu(char **c, struct pxe_menu *cfg, in parse_label_menu() argument
1171 if (!cfg->default_label) in parse_label_menu()
1172 cfg->default_label = strdup(label->name); in parse_label_menu()
1174 if (!cfg->default_label) in parse_label_menu()
1199 static int parse_label(char **c, struct pxe_menu *cfg) in parse_label() argument
1218 list_add_tail(&label->list, &cfg->labels); in parse_label()
1227 err = parse_label_menu(c, cfg, label); in parse_label()
1307 struct pxe_menu *cfg, int nest_level) in parse_pxefile_top() argument
1328 cfg->prompt = 1; in parse_pxefile_top()
1329 err = parse_menu(cmdtp, &p, cfg, in parse_pxefile_top()
1335 err = parse_integer(&p, &cfg->timeout); in parse_pxefile_top()
1339 err = parse_label(&p, cfg); in parse_pxefile_top()
1347 if (cfg->default_label) in parse_pxefile_top()
1348 free(cfg->default_label); in parse_pxefile_top()
1350 cfg->default_label = label_name; in parse_pxefile_top()
1357 base + ALIGN(strlen(b), 4), cfg, in parse_pxefile_top()
1385 static void destroy_pxe_menu(struct pxe_menu *cfg) in destroy_pxe_menu() argument
1390 if (cfg->title) in destroy_pxe_menu()
1391 free(cfg->title); in destroy_pxe_menu()
1393 if (cfg->default_label) in destroy_pxe_menu()
1394 free(cfg->default_label); in destroy_pxe_menu()
1396 list_for_each_safe(pos, n, &cfg->labels) { in destroy_pxe_menu()
1402 free(cfg); in destroy_pxe_menu()
1416 struct pxe_menu *cfg; in parse_pxefile() local
1420 cfg = malloc(sizeof(struct pxe_menu)); in parse_pxefile()
1422 if (!cfg) in parse_pxefile()
1425 memset(cfg, 0, sizeof(struct pxe_menu)); in parse_pxefile()
1427 INIT_LIST_HEAD(&cfg->labels); in parse_pxefile()
1430 r = parse_pxefile_top(cmdtp, buf, menucfg, cfg, 1); in parse_pxefile()
1434 destroy_pxe_menu(cfg); in parse_pxefile()
1438 return cfg; in parse_pxefile()
1445 static struct menu *pxe_menu_to_menu(struct pxe_menu *cfg) in pxe_menu_to_menu() argument
1457 m = menu_create(cfg->title, cfg->timeout, cfg->prompt, label_print, in pxe_menu_to_menu()
1463 list_for_each(pos, &cfg->labels) { in pxe_menu_to_menu()
1471 if (cfg->default_label && in pxe_menu_to_menu()
1472 (strcmp(label->name, cfg->default_label) == 0)) in pxe_menu_to_menu()
1489 printf("Missing default: %s\n", cfg->default_label); in pxe_menu_to_menu()
1499 static void boot_unattempted_labels(cmd_tbl_t *cmdtp, struct pxe_menu *cfg) in boot_unattempted_labels() argument
1504 list_for_each(pos, &cfg->labels) { in boot_unattempted_labels()
1524 static void handle_pxe_menu(cmd_tbl_t *cmdtp, struct pxe_menu *cfg) in handle_pxe_menu() argument
1530 m = pxe_menu_to_menu(cfg); in handle_pxe_menu()
1557 boot_unattempted_labels(cmdtp, cfg); in handle_pxe_menu()
1570 struct pxe_menu *cfg; in do_pxe_boot() local
1591 cfg = parse_pxefile(cmdtp, pxefile_addr_r); in do_pxe_boot()
1593 if (cfg == NULL) { in do_pxe_boot()
1598 handle_pxe_menu(cmdtp, cfg); in do_pxe_boot()
1600 destroy_pxe_menu(cfg); in do_pxe_boot()
1649 struct pxe_menu *cfg; in do_sysboot() local
1703 cfg = parse_pxefile(cmdtp, pxefile_addr_r); in do_sysboot()
1705 if (cfg == NULL) { in do_sysboot()
1711 cfg->prompt = 1; in do_sysboot()
1713 handle_pxe_menu(cmdtp, cfg); in do_sysboot()
1715 destroy_pxe_menu(cfg); in do_sysboot()