diff options
| author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2018-12-11 06:01:05 -0500 |
|---|---|---|
| committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2018-12-21 10:25:54 -0500 |
| commit | f5451582c4e22ce8912aae4950810f3598c9b516 (patch) | |
| tree | fce36383fca69f12a703ec061fdadc6cb691e78f /scripts | |
| parent | 8636a1f9677db4f883f29a072f401303acfc2edd (diff) | |
kconfig: stop supporting '.' and '/' in unquoted words
In my understanding, special characters such as '.' and '/' are
supported in unquoted words to use bare file paths in the "source"
statement.
With the previous commit surrounding all file paths with double
quotes, we can drop this.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/kconfig/preprocess.c | 3 | ||||
| -rw-r--r-- | scripts/kconfig/zconf.l | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/scripts/kconfig/preprocess.c b/scripts/kconfig/preprocess.c index 5ca2df790d3c..b028a48b0e76 100644 --- a/scripts/kconfig/preprocess.c +++ b/scripts/kconfig/preprocess.c | |||
| @@ -555,8 +555,7 @@ char *expand_string(const char *in) | |||
| 555 | 555 | ||
| 556 | static bool is_end_of_token(char c) | 556 | static bool is_end_of_token(char c) |
| 557 | { | 557 | { |
| 558 | /* Why are '.' and '/' valid characters for symbols? */ | 558 | return !(isalnum(c) || c == '_' || c == '-'); |
| 559 | return !(isalnum(c) || c == '_' || c == '-' || c == '.' || c == '/'); | ||
| 560 | } | 559 | } |
| 561 | 560 | ||
| 562 | /* | 561 | /* |
diff --git a/scripts/kconfig/zconf.l b/scripts/kconfig/zconf.l index f8bd84714e00..90d2f37159dc 100644 --- a/scripts/kconfig/zconf.l +++ b/scripts/kconfig/zconf.l | |||
| @@ -160,7 +160,7 @@ n [A-Za-z0-9_-] | |||
| 160 | BEGIN(STRING); | 160 | BEGIN(STRING); |
| 161 | } | 161 | } |
| 162 | \n BEGIN(INITIAL); return T_EOL; | 162 | \n BEGIN(INITIAL); return T_EOL; |
| 163 | ({n}|[/.])+ { | 163 | {n}+ { |
| 164 | const struct kconf_id *id = kconf_id_lookup(yytext, yyleng); | 164 | const struct kconf_id *id = kconf_id_lookup(yytext, yyleng); |
| 165 | if (id && id->flags & TF_PARAM) { | 165 | if (id && id->flags & TF_PARAM) { |
| 166 | yylval.id = id; | 166 | yylval.id = id; |
| @@ -170,7 +170,7 @@ n [A-Za-z0-9_-] | |||
| 170 | yylval.string = text; | 170 | yylval.string = text; |
| 171 | return T_WORD; | 171 | return T_WORD; |
| 172 | } | 172 | } |
| 173 | ({n}|[/.$])+ { | 173 | ({n}|$)+ { |
| 174 | /* this token includes at least one '$' */ | 174 | /* this token includes at least one '$' */ |
| 175 | yylval.string = expand_token(yytext, yyleng); | 175 | yylval.string = expand_token(yytext, yyleng); |
| 176 | if (strlen(yylval.string)) | 176 | if (strlen(yylval.string)) |
