From: Paul Mundt Date: Sat, 22 Dec 2007 22:03:30 +0000 (-0800) Subject: kconfig: obey KCONFIG_ALLCONFIG choices with randconfig. X-Git-Tag: v2.6.24-rc7~43 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=870e6f7e15980d1a33615de572078406737ac22e;p=platform%2Fkernel%2Flinux-3.10.git 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 Cc: Roman Zippel Cc: Sam Ravnborg Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c index a38787a..8d6f174 100644 --- a/scripts/kconfig/conf.c +++ b/scripts/kconfig/conf.c @@ -374,7 +374,8 @@ static int conf_choice(struct menu *menu) continue; break; case set_random: - def = (random() % cnt) + 1; + if (is_new) + def = (random() % cnt) + 1; case set_default: case set_yes: case set_mod: