diff options
author | Li Zefan <lizf@cn.fujitsu.com> | 2010-04-13 23:44:20 -0400 |
---|---|---|
committer | Michal Marek <mmarek@suse.cz> | 2010-04-14 09:34:18 -0400 |
commit | c6ccc30fd7870879981de03feeec61029754b0ea (patch) | |
tree | 0d89b1fd6a862140d9dd9e10def9e9d6687bef89 /scripts/kconfig/zconf.y | |
parent | 4280eae0990190d190dfa7dab9bca480215d5b19 (diff) |
kconfig: fix zconfdump()
zconfdump(), which is used for debugging, can't recognize P_SELECT,
P_RANGE and P_MENU (if associated with a symbol, aka "menuconfig"),
and output something like this:
config X86
boolean
default y
unknown prop 6!
unknown prop 6!
unknown prop 6!
...
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'scripts/kconfig/zconf.y')
-rw-r--r-- | scripts/kconfig/zconf.y | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/scripts/kconfig/zconf.y b/scripts/kconfig/zconf.y index 258f16608ec0..23dfd3baa7a1 100644 --- a/scripts/kconfig/zconf.y +++ b/scripts/kconfig/zconf.y | |||
@@ -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 | ||
656 | void zconfdump(FILE *out) | 670 | void 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) |