Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1764430AbXFAUy2 (ORCPT ); Fri, 1 Jun 2007 16:54:28 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1762327AbXFAUyT (ORCPT ); Fri, 1 Jun 2007 16:54:19 -0400 Received: from pasmtpa.tele.dk ([80.160.77.114]:56636 "EHLO pasmtpA.tele.dk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1762129AbXFAUyS (ORCPT ); Fri, 1 Jun 2007 16:54:18 -0400 Date: Fri, 1 Jun 2007 22:55:19 +0200 From: Sam Ravnborg To: Dave Jones , Andrew Morton , clameter@sgi.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Roman Zippel Subject: Re: [RFC 1/4] CONFIG_STABLE: Define it Message-ID: <20070601205519.GA4469@uranus.ravnborg.org> References: <20070531002047.702473071@sgi.com> <20070531003012.302019683@sgi.com> <20070531141147.423ad5e3.akpm@linux-foundation.org> <20070531213046.GA27923@uranus.ravnborg.org> <20070601180200.GA7968@redhat.com> <20070601202202.GA4232@uranus.ravnborg.org> <20070601203006.GB865@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070601203006.GB865@redhat.com> User-Agent: Mutt/1.4.2.1i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1439 Lines: 42 On Fri, Jun 01, 2007 at 04:30:06PM -0400, Dave Jones wrote: > On Fri, Jun 01, 2007 at 10:22:02PM +0200, Sam Ravnborg wrote: > > On Fri, Jun 01, 2007 at 02:02:00PM -0400, Dave Jones wrote: > > > On Thu, May 31, 2007 at 11:30:46PM +0200, Sam Ravnborg wrote: > > > > > + sym = sym_lookup("DEVEL_KERNEL", 0); > > > > > + sym->type = S_BOOLEAN; > > > > > + sym->flags |= SYMBOL_AUTO; > > > > > + p = getenv("DEVEL_KERNEL"); > > > > > + if (p && atoi(p)) > > > > > + sym_add_default(sym, "y"); > > > > > + else > > > > > + sym_add_default(sym, "n"); > > > > > + > > > > > > > > sym_set_tristate_value(sym, yes); > > > > else > > > > sym_set_tristate_value(sym, no); > > > > > > > > should do the trick (untested). > > > > > > Odd. What's the third state ? Undefined? > > no, mod, yes > > Representing: no, module, yes as the three config choices. > > Now I'm even more puzzled. Why would 'DEVEL_KERNEL' need > to be modular ? The same type is used to represent a boolean and a tristate within kconfig: typedef enum tristate { no, mod, yes } tristate; And in the cases where the config symbol is of type 'bool' then the value 'mod' is not used. Sam - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/