diff options
author | Karel Kočí <cynerd@email.cz> | 2015-04-24 22:09:30 +0200 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2015-04-24 22:09:30 +0200 |
commit | 2d9ad83a3d62ae83b3ea14266014d9b50148ad2f (patch) | |
tree | c799a36f6a0303fbd2484ba9eb60f5e20d70fc1b /scripts/parse_kconfig/symlist.c | |
parent | b4b0378358fb3d46c4f483effb6ee957857b06c5 (diff) | |
download | linux-conf-perf-2d9ad83a3d62ae83b3ea14266014d9b50148ad2f.tar.gz linux-conf-perf-2d9ad83a3d62ae83b3ea14266014d9b50148ad2f.tar.bz2 linux-conf-perf-2d9ad83a3d62ae83b3ea14266014d9b50148ad2f.zip |
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.
Diffstat (limited to 'scripts/parse_kconfig/symlist.c')
-rw-r--r-- | scripts/parse_kconfig/symlist.c | 7 |
1 files changed, 6 insertions, 1 deletions
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; |