kconfig: handle P_SYMBOL in print_symbol()
authorDirk Gouders <dirk@gouders.net>
Fri, 22 Jun 2018 19:27:38 +0000 (21:27 +0200)
committerChristian Lamparter <chunkeey@gmail.com>
Sun, 10 Feb 2019 21:13:47 +0000 (22:13 +0100)
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 <dirk@gouders.net>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
config/expr.h
config/zconf.y

index 94a383b21df6405f4a9f6b6c08758d6c822381d8..f63b41b0dd498d23b65b3c12fe47e3b2c87e148d 100644 (file)
@@ -171,6 +171,9 @@ struct symbol {
  * config BAZ
  *         int "BAZ Value"
  *         range 1..255
  * 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,
  */
 enum prop_type {
        P_UNKNOWN,
index 0599a847cf88f11a7f124f3dcd884d17d85b1469..d9a095200e9dd94163401d577309cce435863cf6 100644 (file)
@@ -718,6 +718,10 @@ static void print_symbol(FILE *out, struct menu *menu)
                        print_quoted_string(out, prop->text);
                        fputc('\n', out);
                        break;
                        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;
                default:
                        fprintf(out, "  unknown prop %d!\n", prop->type);
                        break;