From 2d9ad83a3d62ae83b3ea14266014d9b50148ad2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Fri, 24 Apr 2015 22:09:30 +0200 Subject: parse_kconfig fix wrong behaviour for non prompt symbols Non prompt symbols should be selected always as their dependencies are satisfied. This changes adds generation of relevant rules. --- scripts/parse_kconfig/symlist.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'scripts/parse_kconfig/symlist.c') diff --git a/scripts/parse_kconfig/symlist.c b/scripts/parse_kconfig/symlist.c index a184829..c6e5140 100644 --- a/scripts/parse_kconfig/symlist.c +++ b/scripts/parse_kconfig/symlist.c @@ -15,12 +15,17 @@ void symlist_add(struct symlist *sl, char *name) { sl->array = realloc(sl->array, sl->size * sizeof(struct symlist_el)); } - sl->array[sl->pos].id = (unsigned)sl->pos + 1; + sl->array[sl->pos].id = (unsigned) sl->pos + 1; sl->array[sl->pos].name = name; sl->array[sl->pos].be = NULL; + sl->array[sl->pos].prompt = false; sl->pos++; } +void symlist_set_prompt(struct symlist *sl, char *name, bool prompt) { + symlist_find(sl, name)->prompt = prompt; +} + // TODO faster implementation? Maybe binary search tree? struct symlist_el *symlist_find(struct symlist *sl, char *name) { size_t i = 0; -- cgit v1.2.3