Commit 870e6f7e authored by Paul Mundt's avatar Paul Mundt Committed by Linus Torvalds

kconfig: obey KCONFIG_ALLCONFIG choices with randconfig.

Currently when using KCONFIG_ALLCONFIG with randconfig the choice options
are clobbered.  As recommended by Roman, this adds an is_new test to see
whether to select a new option or obey the existing one.

This is a resend of the earlier patch a couple of weeks ago, since there
was no reply.  Original thread is at http://lkml.org/lkml/2007/11/28/94Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 7bbaac12
...@@ -374,6 +374,7 @@ static int conf_choice(struct menu *menu) ...@@ -374,6 +374,7 @@ static int conf_choice(struct menu *menu)
continue; continue;
break; break;
case set_random: case set_random:
if (is_new)
def = (random() % cnt) + 1; def = (random() % cnt) + 1;
case set_default: case set_default:
case set_yes: case set_yes:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment