sys/conf/DEFAULT[S]

Stefan Farfeleder stefan at fafoe.narf.at
Sat Sep 27 03:53:06 PDT 2003


On Sat, Sep 27, 2003 at 08:14:30AM +1000, Bruce Evans wrote:

> Similarly with FOOBAR's contents identical with SMP's contents except
> for including FOO instead of GENERIC.  So the bug must be related to
> the file being included ... adding an empty or comment line to the
> beginning of FOO works around it.  I guess there is an off-by-1 byte
> or line error switching the input stream.

The problem is simply that the input stream is switched immediately to
the included file after reading the file name and the parser is still
waiting for its newline or semicolon from the production

Spec -> Config_spec SEMICOLON.

Thus the terminal 'machine' on the first line is a syntax error.

Stefan
-------------- next part --------------
Index: src/usr.sbin/config/config.y
===================================================================
RCS file: /usr/home/ncvs/src/usr.sbin/config/config.y,v
retrieving revision 1.61
diff -u -r1.61 config.y
--- src/usr.sbin/config/config.y	6 Jul 2003 02:00:52 -0000	1.61
+++ src/usr.sbin/config/config.y	27 Sep 2003 10:39:13 -0000
@@ -118,6 +118,9 @@
 		|
 	Config_spec SEMICOLON
 		|
+	INCLUDE ID SEMICOLON
+	      = { include($2, 0); };
+		|
 	SEMICOLON
 		|
 	error SEMICOLON
@@ -164,9 +167,7 @@
 	      = {
 		      hints = $2;
 		      hintmode = 1;
-	        } |
-	INCLUDE ID
-	      = { include($2, 0); };
+	        }
 
 System_spec:
 	CONFIG System_id System_parameter_list


More information about the freebsd-arch mailing list