diff options
author | Li Zefan <lizf@cn.fujitsu.com> | 2010-04-14 11:44:20 +0800 |
---|---|---|
committer | Michal Marek <mmarek@suse.cz> | 2010-04-14 15:34:18 +0200 |
commit | c6ccc30fd7870879981de03feeec61029754b0ea (patch) | |
tree | 0d89b1fd6a862140d9dd9e10def9e9d6687bef89 /scripts | |
parent | 4280eae0990190d190dfa7dab9bca480215d5b19 (diff) | |
download | linux-stable-c6ccc30fd7870879981de03feeec61029754b0ea.tar.gz linux-stable-c6ccc30fd7870879981de03feeec61029754b0ea.tar.bz2 linux-stable-c6ccc30fd7870879981de03feeec61029754b0ea.zip |
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')
-rw-r--r-- | scripts/kconfig/zconf.tab.c_shipped | 21 | ||||
-rw-r--r-- | scripts/kconfig/zconf.y | 21 |
2 files changed, 34 insertions, 8 deletions
diff --git a/scripts/kconfig/zconf.tab.c_shipped b/scripts/kconfig/zconf.tab.c_shipped index 7df3264c3f3d..32a9eefd842c 100644 --- a/scripts/kconfig/zconf.tab.c_shipped +++ b/scripts/kconfig/zconf.tab.c_shipped @@ -2336,9 +2336,9 @@ static void print_symbol(FILE *out, struct menu *menu) struct property *prop; if (sym_is_choice(sym)) - fprintf(out, "choice\n"); + fprintf(out, "\nchoice\n"); else - fprintf(out, "config %s\n", sym->name); + fprintf(out, "\nconfig %s\n", sym->name); switch (sym->type) { case S_BOOLEAN: fputs(" boolean\n", out); @@ -2384,6 +2384,21 @@ static void print_symbol(FILE *out, struct menu *menu) case P_CHOICE: fputs(" #choice value\n", out); break; + case P_SELECT: + fputs( " select ", out); + expr_fprint(prop->expr, out); + fputc('\n', out); + break; + case P_RANGE: + fputs( " range ", out); + expr_fprint(prop->expr, out); + fputc('\n', out); + break; + case P_MENU: + fputs( " menu ", out); + print_quoted_string(out, prop->text); + fputc('\n', out); + break; default: fprintf(out, " unknown prop %d!\n", prop->type); break; @@ -2395,7 +2410,6 @@ static void print_symbol(FILE *out, struct menu *menu) menu->help[len] = 0; fprintf(out, " help\n%s\n", menu->help); } - fputc('\n', out); } void zconfdump(FILE *out) @@ -2428,7 +2442,6 @@ void zconfdump(FILE *out) expr_fprint(prop->visible.expr, out); fputc('\n', out); } - fputs("\n", out); } if (menu->list) 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) struct property *prop; if (sym_is_choice(sym)) - fprintf(out, "choice\n"); + fprintf(out, "\nchoice\n"); else - fprintf(out, "config %s\n", sym->name); + fprintf(out, "\nconfig %s\n", sym->name); switch (sym->type) { case S_BOOLEAN: fputs(" boolean\n", out); @@ -639,6 +639,21 @@ static void print_symbol(FILE *out, struct menu *menu) case P_CHOICE: fputs(" #choice value\n", out); break; + case P_SELECT: + fputs( " select ", out); + expr_fprint(prop->expr, out); + fputc('\n', out); + break; + case P_RANGE: + fputs( " range ", out); + expr_fprint(prop->expr, out); + fputc('\n', out); + break; + case P_MENU: + fputs( " menu ", out); + print_quoted_string(out, prop->text); + fputc('\n', out); + break; default: fprintf(out, " unknown prop %d!\n", prop->type); break; @@ -650,7 +665,6 @@ static void print_symbol(FILE *out, struct menu *menu) menu->help[len] = 0; fprintf(out, " help\n%s\n", menu->help); } - fputc('\n', out); } void zconfdump(FILE *out) @@ -683,7 +697,6 @@ void zconfdump(FILE *out) expr_fprint(prop->visible.expr, out); fputc('\n', out); } - fputs("\n", out); } if (menu->list) |