summaryrefslogtreecommitdiff
path: root/kconfig/expr.c
diff options
context:
space:
mode:
Diffstat (limited to 'kconfig/expr.c')
-rw-r--r--kconfig/expr.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/kconfig/expr.c b/kconfig/expr.c
index cbf4996..8cee597 100644
--- a/kconfig/expr.c
+++ b/kconfig/expr.c
@@ -893,7 +893,10 @@ static enum string_value_kind expr_parse_string(const char *str,
switch (type) {
case S_BOOLEAN:
case S_TRISTATE:
- return k_string;
+ val->s = !strcmp(str, "n") ? 0 :
+ !strcmp(str, "m") ? 1 :
+ !strcmp(str, "y") ? 2 : -1;
+ return k_signed;
case S_INT:
val->s = strtoll(str, &tail, 10);
kind = k_signed;