Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Oct 2004 12:17:17 +0200
From:      des@des.no (=?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=)
To:        Scott Long <scottl@freebsd.org>
Cc:        cvs-all@freebsd.org
Subject:   Re: cvs commit: src/usr.sbin/config lang.l
Message-ID:  <xzpd5z8fmj6.fsf@dwp.des.no>
In-Reply-To: <417B7AB2.9060004@freebsd.org> (Scott Long's message of "Sun, 24 Oct 2004 03:49:38 -0600")
References:  <200410240938.i9O9cf4U083000@repoman.freebsd.org> <417B7AB2.9060004@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
--=-=-=
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

Scott Long <scottl@freebsd.org> writes:
> Sigh.  I'm sorry I didn't have more time to discuss this.  It's indeed a
> simple fix (which I had already done and tested), but I was stuck on
> fixing all of the memory leaks that are present.  I also wanted to add
> a 'includedir' token to the grammar so you would override the defaults.

Sorry, I didn't realize you were already working on this.  It seemed
like a very simple and useful change and noone had provided any
patches, so I jumped on it.

I have more stuff coming - the attached patch allows for multiple
comma-separated device names on each device / nodevice line.  I can
take care of includedir as well if you want me to.

DES
--=20
Dag-Erling Sm=F8rgrav - des@des.no


--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment; filename=config.diff

Index: config.y
===================================================================
RCS file: /home/ncvs/src/usr.sbin/config/config.y,v
retrieving revision 1.64
diff -u -r1.64 config.y
--- config.y	30 Aug 2004 23:03:56 -0000	1.64
+++ config.y	24 Oct 2004 10:15:35 -0000
@@ -246,20 +246,40 @@
 	;
 
 Device_spec:
-	DEVICE Dev
+	DEVICE Dev_list
+		|
+	NODEVICE NoDev_list
+		;
+
+Dev_list:
+	Dev_list COMMA Device
+		|
+	Device
+		;
+
+NoDev_list:
+	NoDev_list COMMA NoDevice
+		|
+	NoDevice
+		;
+
+Device:
+	Dev
 	      = {
-		newopt(&opt, devopt($2), ns("1"));
+		newopt(&opt, devopt($1), ns("1"));
 		/* and the device part */
-		newdev($2);
-		} |
-	NODEVICE Dev
+		newdev($1);
+		}
+
+NoDevice:
+	Dev
 	      = {
-		char *s = devopt($2);
+		char *s = devopt($1);
 
 		rmopt(&opt, s);
 		free(s);
 		/* and the device part */
-		rmdev($2);
+		rmdev($1);
 		} ;
 
 %%

--=-=-=--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?xzpd5z8fmj6.fsf>