Skip to content

Commit

Permalink
kconfig: Don't go out from read config loop when you read new symbol
Browse files Browse the repository at this point in the history
commit 8baefd3 of linux-next replaced
a `switch()' statement with some `if()' statements, but left `break's
in the `switch()' statement untouched. This cause read config loop to
exit and so "make oldconfig" is not much usable (see below).

> $ make oldconfig
><snip>
> scripts/kconfig/conf --oldconfig Kconfig
> #
> # using defaults found in /boot/config-2.6.34-ccs-r1
> #
> *
> * Restart config...
> *
> *
> * General setup
> *
> Prompt for development and/or incomplete code/drivers (EXPERIMENTAL) [N/y/?] (NEW)

(I've already have "CONFIG_EXPERIMENTAL=y" in the old config file. But
that's not read here.)

This patch should fix this problem.

Signed-off-by: Naohiro Aota <naota@elisp.net>
Signed-off-by: Michal Marek <mmarek@suse.cz>
  • Loading branch information
Naohiro Aota authored and Michal Marek committed Sep 30, 2010
1 parent 0455029 commit 8bea754
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/kconfig/confdata.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ int conf_read_simple(const char *name, int def)
sym = sym_find(line + 2 + strlen(CONFIG_));
if (!sym) {
sym_add_change_count(1);
break;
goto setsym;
}
} else {
sym = sym_lookup(line + 2 + strlen(CONFIG_), 0);
Expand Down Expand Up @@ -268,7 +268,7 @@ int conf_read_simple(const char *name, int def)
sym = sym_find(line + strlen(CONFIG_));
if (!sym) {
sym_add_change_count(1);
break;
goto setsym;
}
} else {
sym = sym_lookup(line + strlen(CONFIG_), 0);
Expand All @@ -285,6 +285,7 @@ int conf_read_simple(const char *name, int def)
conf_warning("unexpected data");
continue;
}
setsym:
if (sym && sym_is_choice_value(sym)) {
struct symbol *cs = prop_get_symbol(sym_get_choice_prop(sym));
switch (sym->def[def].tri) {
Expand Down

0 comments on commit 8bea754

Please sign in to comment.