Re: 2.6.16-mm1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Thu, 23 Mar 2006, Russell King wrote:

> Okay, so the default is now 'm', but the legal values are still only 'n'
> and 'm'.  I can only select 'm' or 'n', and this is what I end up with in
> the config file.  Now, if I remove the prompt text:
> 
> config SYM_D
>         tristate
>         depends on SYM_M && SYM_Y
>         default y
> 
> and hey presto, suddenly 'y' becomes a legal value.
> 
> CONFIG_SYM_Y=y
> CONFIG_SYM_M=m
> CONFIG_SYM_D=y
> 
> So it would seem to be a Kconfig bug.

No, it's not a bug, that's really the correct behaviour. It has its roots 
in the cml1 converter, where statements like this:

if [ "$CONFIG_FOO" = "y" ]; then
  define_tristate CONFIG_BAR y
fi

would become:

config BAR
	default y
	depends on FOO=y

The basic idea is that the dependency only enables the default and the 
default sets the symbol to whatever you want.

I thought about the other behaviour, but at that time the if syntax or 
select didn't exists yet, so it really wasn't a problem yet and I decided 
to keep it closer to cml1 instead.

In the meantime the Kconfig syntax has grown and this is not the first 
time this has come up. I'm not completely opposed against changing the 
behaviour, but I don't want to do it just for fun either. It would require 
at least to grep through the current Kconfig rules to check whether 
something depends on the current behaviour.

As alternative you can change the default to "SYM_M" (basically repeating 
the dependency without the booleans).

bye, Roman
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux