From 9625eb0fa4e880b87250d8596bdae6ae1d95a21c Mon Sep 17 00:00:00 2001 From: Dirk Gouders Date: Fri, 22 Jun 2018 21:27:38 +0200 Subject: [PATCH] kconfig: handle P_SYMBOL in print_symbol() Each symbol has a property of type P_SYMBOL since commit 59e89e3ddf85 (kconfig: save location of config symbols). Handle those properties in print_symbol(). Further, place a pointer to print_symbol() in the comment above the list of known property type. Signed-off-by: Dirk Gouders Signed-off-by: Masahiro Yamada Signed-off-by: Christian Lamparter --- config/expr.h | 3 +++ config/zconf.y | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/config/expr.h b/config/expr.h index 94a383b..f63b41b 100644 --- a/config/expr.h +++ b/config/expr.h @@ -171,6 +171,9 @@ struct symbol { * config BAZ * int "BAZ Value" * range 1..255 + * + * Please, also check zconf.y:print_symbol() when modifying the + * list of property types! */ enum prop_type { P_UNKNOWN, diff --git a/config/zconf.y b/config/zconf.y index 0599a84..d9a0952 100644 --- a/config/zconf.y +++ b/config/zconf.y @@ -718,6 +718,10 @@ static void print_symbol(FILE *out, struct menu *menu) print_quoted_string(out, prop->text); fputc('\n', out); break; + case P_SYMBOL: + fputs( " symbol ", out); + fprintf(out, "%s\n", prop->sym->name); + break; default: fprintf(out, " unknown prop %d!\n", prop->type); break; -- 2.31.1