diff options
author | Paul Mundt <lethal@linux-sh.org> | 2007-12-22 17:03:30 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-12-23 15:54:37 -0500 |
commit | 870e6f7e15980d1a33615de572078406737ac22e (patch) | |
tree | 073a330ab61c22335922f5a5c8c7c8d63bef6741 | |
parent | 7bbaac12a6036f55111a54b01908d0f3afe8622d (diff) |
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/94
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | scripts/kconfig/conf.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c index a38787a881ea..8d6f17490c5e 100644 --- a/scripts/kconfig/conf.c +++ b/scripts/kconfig/conf.c | |||
@@ -374,7 +374,8 @@ static int conf_choice(struct menu *menu) | |||
374 | continue; | 374 | continue; |
375 | break; | 375 | break; |
376 | case set_random: | 376 | case set_random: |
377 | def = (random() % cnt) + 1; | 377 | if (is_new) |
378 | def = (random() % cnt) + 1; | ||
378 | case set_default: | 379 | case set_default: |
379 | case set_yes: | 380 | case set_yes: |
380 | case set_mod: | 381 | case set_mod: |