Allow kernel config files to include files other than those in the CWD,
using unquoted paths.
This commit is contained in:
parent
0c5544bb64
commit
eb43240464
@ -31,6 +31,7 @@
|
||||
%type <str> Save_id
|
||||
%type <str> Opt_value
|
||||
%type <str> Dev
|
||||
%token <str> PATH
|
||||
|
||||
%{
|
||||
|
||||
@ -128,6 +129,11 @@ Spec:
|
||||
|
|
||||
Config_spec SEMICOLON
|
||||
|
|
||||
INCLUDE PATH SEMICOLON {
|
||||
if (incignore == 0)
|
||||
include($2, 0);
|
||||
};
|
||||
|
|
||||
INCLUDE ID SEMICOLON {
|
||||
if (incignore == 0)
|
||||
include($2, 0);
|
||||
|
@ -96,6 +96,7 @@ int yyerror(const char *);
|
||||
|
||||
%}
|
||||
ID [A-Za-z_][-A-Za-z_0-9]*
|
||||
PATH [./][-/.%^A-Za-z_0-9]+
|
||||
%START TOEOL
|
||||
%%
|
||||
{ID} {
|
||||
@ -165,6 +166,11 @@ ID [A-Za-z_][-A-Za-z_0-9]*
|
||||
return tok;
|
||||
/* otherwise continue scanning */
|
||||
}
|
||||
{PATH} {
|
||||
BEGIN 0;
|
||||
yylval.str = strdup(yytext);
|
||||
return PATH;
|
||||
}
|
||||
. { return yytext[0]; }
|
||||
|
||||
%%
|
||||
|
Loading…
x
Reference in New Issue
Block a user