1 Sep 2007 01:53
Re: tristate choice with bool value
Roman Zippel <zippel <at> linux-m68k.org>
2007-08-31 23:53:07 GMT
2007-08-31 23:53:07 GMT
Hi,
On Fri, 31 Aug 2007, Jan Beulich wrote:
> Doing a few more experiments with choices, I find that int, hex, and string
> don't seem to work at all here. It would seem to me that these all could be
> useful, but clearly would require some changes even in the grammar in order
> to get there.
Well, in the long term I wouldn't mind making choices more flexible,
basically as a general way to describe more complex interdependencies
between symbols, although I'm not sure how string symbols are useful here.
The basic problem is to keep the syntax and user interface sane and there
has to be a mechanism to resolve conflicts between these dependencies.
> Also I think that deriving the choice type from the type of the first choice
> value isn't always correct - at least not in the case of a mixed set of bool/
> tristate values, in which case the choice should become tristate itself.
I'm not entirely convinced, mixing types is a good idea, but anyway... :)
> --- a/scripts/kconfig/menu.c
> +++ b/scripts/kconfig/menu.c
> <at> <at> -238,6 +238,9 <at> <at> void menu_finalize(struct menu *parent)
> /* find the first choice value and find out choice type */
> for (menu = parent->list; menu; menu = menu->next) {
> if (menu->sym) {
> + if (sym->type == S_TRISTATE &&
> + menu->sym->type == S_BOOLEAN)
> + break;
(Continue reading)
RSS Feed