public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* kconfig: Obey KCONFIG_ALLCONFIG choices with randconfig.
@ 2007-12-17  4:31 Paul Mundt
  0 siblings, 0 replies; only message in thread
From: Paul Mundt @ 2007-12-17  4:31 UTC (permalink / raw)
  To: Andrew Morton, Linus Torvalds
  Cc: Sam Ravnborg, Adrian Bunk, linux-kbuild, linux-kernel,
	Roman Zippel

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

It would be nice to have this for 2.6.24.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>

---

 scripts/kconfig/conf.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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:

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2007-12-17  4:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-17  4:31 kconfig: Obey KCONFIG_ALLCONFIG choices with randconfig Paul Mundt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox