From 31847b67bec0e989961118520406a63fdeac7246 Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Mon, 15 Jun 2015 13:00:21 +0100 Subject: 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 Signed-off-by: Michal Marek --- scripts/kconfig/expr.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'scripts/kconfig/expr.h') diff --git a/scripts/kconfig/expr.h b/scripts/kconfig/expr.h index a2fc96a2bd2c..973b6f733368 100644 --- a/scripts/kconfig/expr.h +++ b/scripts/kconfig/expr.h @@ -29,7 +29,9 @@ typedef enum tristate { } tristate; enum expr_type { - E_NONE, E_OR, E_AND, E_NOT, E_EQUAL, E_UNEQUAL, E_LIST, E_SYMBOL, E_RANGE + E_NONE, E_OR, E_AND, E_NOT, + E_EQUAL, E_UNEQUAL, E_LTH, E_LEQ, E_GTH, E_GEQ, + E_LIST, E_SYMBOL, E_RANGE }; union expr_data { -- cgit