aboutsummaryrefslogtreecommitdiff
path: root/scripts/parse_kconfig
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/parse_kconfig')
-rw-r--r--scripts/parse_kconfig/boolexpr.c16
-rw-r--r--scripts/parse_kconfig/output.c1
-rw-r--r--scripts/parse_kconfig/output.h1
-rw-r--r--scripts/parse_kconfig/symlist.c2
4 files changed, 14 insertions, 6 deletions
diff --git a/scripts/parse_kconfig/boolexpr.c b/scripts/parse_kconfig/boolexpr.c
index ccd7cef..4ce4154 100644
--- a/scripts/parse_kconfig/boolexpr.c
+++ b/scripts/parse_kconfig/boolexpr.c
@@ -113,11 +113,17 @@ struct boolexpr *boolexpr_sym(struct symlist *sl, struct symbol *sym) {
struct boolexpr *rtn;
rtn = malloc(sizeof(struct boolexpr));
rtn->overusage = 0;
- rtn->id = symlist_id(sl, sym->name);
- if (rtn->id != 0)
- rtn->type = BT_SYM;
- else
- rtn->type = BT_FALSE;
+ if (!strcmp(sym->name, "m") || !strcmp(sym->name, "n")) {
+ rtn->type = BT_FALSE;
+ } else if (!strcmp(sym->name, "y")) {
+ rtn->type = BT_TRUE;
+ } else {
+ rtn->id = symlist_id(sl, sym->name);
+ if (rtn->id != 0)
+ rtn->type = BT_SYM;
+ else
+ rtn->type = BT_FALSE;
+ }
return rtn;
}
diff --git a/scripts/parse_kconfig/output.c b/scripts/parse_kconfig/output.c
index 47442ce..81debaf 100644
--- a/scripts/parse_kconfig/output.c
+++ b/scripts/parse_kconfig/output.c
@@ -30,6 +30,7 @@ void output_rules_endterm(void) {
fprintf(frules, "\n");
}
+// Functions for variable_count
void output_write_variable_count(char *var_file, int count) {
FILE *f;
f = fopen(var_file, "w");
diff --git a/scripts/parse_kconfig/output.h b/scripts/parse_kconfig/output.h
index de8f672..2950f7a 100644
--- a/scripts/parse_kconfig/output.h
+++ b/scripts/parse_kconfig/output.h
@@ -20,4 +20,5 @@ void output_rules_endterm(void);
// Functions for variable_count
void output_write_variable_count(char *var_file, int count);
+
#endif /* _OUTPUT_H_ */
diff --git a/scripts/parse_kconfig/symlist.c b/scripts/parse_kconfig/symlist.c
index 62cdd6c..d38dde1 100644
--- a/scripts/parse_kconfig/symlist.c
+++ b/scripts/parse_kconfig/symlist.c
@@ -26,7 +26,7 @@ void symlist_add(struct symlist *sl, char *name) {
}
void symlist_closesym(struct symlist *sl) {
- sl->lastsym = (unsigned) sl->pos;
+ sl->lastsym = (unsigned) sl->pos + 1;
}
unsigned symlist_adddummy(struct symlist *sl) {