diff options
Diffstat (limited to 'usr.sbin/config/config.y')
-rw-r--r-- | usr.sbin/config/config.y | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/usr.sbin/config/config.y b/usr.sbin/config/config.y index 0ee7f28..d16982a 100644 --- a/usr.sbin/config/config.y +++ b/usr.sbin/config/config.y @@ -22,6 +22,7 @@ %token NOMAKEOPTION %token SEMICOLON %token INCLUDE +%token FILES %token <str> ID %token <val> NUMBER @@ -84,6 +85,7 @@ int hintmode; int yyline; const char *yyfile; struct file_list_head ftab; +struct files_name_head fntab; char errbuf[80]; int maxusers; @@ -121,6 +123,9 @@ Spec: INCLUDE ID SEMICOLON = { include($2, 0); }; | + FILES ID SEMICOLON + = { newfile($2); }; + | SEMICOLON | error SEMICOLON @@ -276,6 +281,20 @@ yyerror(const char *s) } /* + * Add a new file to the list of files. + */ +static void +newfile(char *name) +{ + struct files_name *nl; + + nl = (struct files_name *) malloc(sizeof *nl); + bzero(nl, sizeof *nl); + nl->f_name = name; + STAILQ_INSERT_TAIL(&fntab, nl, f_next); +} + +/* * add a device to the list of devices */ static void |