Allow kernel config files to include files other than those in the CWD,

using unquoted paths.
This commit is contained in:
David E. O'Brien 2008-07-28 17:11:57 +00:00
parent 0c5544bb64
commit eb43240464
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=180922
2 changed files with 12 additions and 0 deletions

View File

@ -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);

View File

@ -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]; }
%%