kconfig: handle P_SYMBOL in print_symbol()
authorDirk Gouders <dirk@gouders.net>
Fri, 22 Jun 2018 19:27:38 +0000 (21:27 +0200)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Thu, 28 Jun 2018 13:47:47 +0000 (22:47 +0900)
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>
scripts/kconfig/expr.h
scripts/kconfig/zconf.y

index 94a383b21df6405f4a9f6b6c08758d6c822381d8..f63b41b0dd498d23b65b3c12fe47e3b2c87e148d 100644 (file)
@@ -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,
index ed84d4a8e2886561b1deee320a5ca4fd9d0e9da0..4b68272ebdb96cb25e8d91de0d4cbc792a3079b6 100644 (file)
@@ -717,6 +717,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;