kconfig: allow use of relations other than (in)equality
Over the years I found it desirable to be able to use all sorts of relations, not just (in)equality. And apparently I'm not the only one, as there's at least one example in the tree where the programmer assumed this would work (see DEBUG_UART_8250_WORD in arch/arm/Kconfig.debug). Another possible use would e.g. be to fold the two SMP/NR_CPUS prompts into one: SMP could be promptless, simply depending on NR_CPUS > 1. A (desirable) side effect of this change - resulting from numeric values now necessarily being compared as numbers rather than as strings - is that comparing hex values now works as expected: Other than int ones (which aren't allowed to have leading zeroes), zeroes following the 0x prefix made them compare unequal even if their values were equal. Signed-off-by: Jan Beulich <jbeulich@suse.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
This commit is contained in:

zatwierdzone przez
Michal Marek

rodzic
2e0d737fc7
commit
31847b67be
@@ -122,6 +122,10 @@ n [A-Za-z0-9_]
|
||||
"!" return T_NOT;
|
||||
"=" return T_EQUAL;
|
||||
"!=" return T_UNEQUAL;
|
||||
"<=" return T_LESS_EQUAL;
|
||||
">=" return T_GREATER_EQUAL;
|
||||
"<" return T_LESS;
|
||||
">" return T_GREATER;
|
||||
\"|\' {
|
||||
str = yytext[0];
|
||||
new_string();
|
||||
|
Reference in New Issue
Block a user