aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/kconfig/zconf.y
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/kconfig/zconf.y')
-rw-r--r--scripts/kconfig/zconf.y25
1 files changed, 19 insertions, 6 deletions
diff --git a/scripts/kconfig/zconf.y b/scripts/kconfig/zconf.y
index 8c43491f8cc9..23dfd3baa7a1 100644
--- a/scripts/kconfig/zconf.y
+++ b/scripts/kconfig/zconf.y
@@ -27,7 +27,7 @@ static void zconf_error(const char *err, ...);
27static void zconferror(const char *err); 27static void zconferror(const char *err);
28static bool zconf_endtoken(struct kconf_id *id, int starttoken, int endtoken); 28static bool zconf_endtoken(struct kconf_id *id, int starttoken, int endtoken);
29 29
30struct symbol *symbol_hash[257]; 30struct symbol *symbol_hash[SYMBOL_HASHSIZE];
31 31
32static struct menu *current_menu, *current_entry; 32static struct menu *current_menu, *current_entry;
33 33
@@ -475,7 +475,7 @@ void conf_parse(const char *name)
475 zconf_initscan(name); 475 zconf_initscan(name);
476 476
477 sym_init(); 477 sym_init();
478 menu_init(); 478 _menu_init();
479 modules_sym = sym_lookup(NULL, 0); 479 modules_sym = sym_lookup(NULL, 0);
480 modules_sym->type = S_BOOLEAN; 480 modules_sym->type = S_BOOLEAN;
481 modules_sym->flags |= SYMBOL_AUTO; 481 modules_sym->flags |= SYMBOL_AUTO;
@@ -591,9 +591,9 @@ static void print_symbol(FILE *out, struct menu *menu)
591 struct property *prop; 591 struct property *prop;
592 592
593 if (sym_is_choice(sym)) 593 if (sym_is_choice(sym))
594 fprintf(out, "choice\n"); 594 fprintf(out, "\nchoice\n");
595 else 595 else
596 fprintf(out, "config %s\n", sym->name); 596 fprintf(out, "\nconfig %s\n", sym->name);
597 switch (sym->type) { 597 switch (sym->type) {
598 case S_BOOLEAN: 598 case S_BOOLEAN:
599 fputs(" boolean\n", out); 599 fputs(" boolean\n", out);
@@ -639,6 +639,21 @@ static void print_symbol(FILE *out, struct menu *menu)
639 case P_CHOICE: 639 case P_CHOICE:
640 fputs(" #choice value\n", out); 640 fputs(" #choice value\n", out);
641 break; 641 break;
642 case P_SELECT:
643 fputs( " select ", out);
644 expr_fprint(prop->expr, out);
645 fputc('\n', out);
646 break;
647 case P_RANGE:
648 fputs( " range ", out);
649 expr_fprint(prop->expr, out);
650 fputc('\n', out);
651 break;
652 case P_MENU:
653 fputs( " menu ", out);
654 print_quoted_string(out, prop->text);
655 fputc('\n', out);
656 break;
642 default: 657 default:
643 fprintf(out, " unknown prop %d!\n", prop->type); 658 fprintf(out, " unknown prop %d!\n", prop->type);
644 break; 659 break;
@@ -650,7 +665,6 @@ static void print_symbol(FILE *out, struct menu *menu)
650 menu->help[len] = 0; 665 menu->help[len] = 0;
651 fprintf(out, " help\n%s\n", menu->help); 666 fprintf(out, " help\n%s\n", menu->help);
652 } 667 }
653 fputc('\n', out);
654} 668}
655 669
656void zconfdump(FILE *out) 670void zconfdump(FILE *out)
@@ -683,7 +697,6 @@ void zconfdump(FILE *out)
683 expr_fprint(prop->visible.expr, out); 697 expr_fprint(prop->visible.expr, out);
684 fputc('\n', out); 698 fputc('\n', out);
685 } 699 }
686 fputs("\n", out);
687 } 700 }
688 701
689 if (menu->list) 702 if (menu->list)